can't run python setup.py develop

hi! i’m new in here and trying to install chipwhisperer on linux ubuntu 64 bit. when i try to run the command pyhton setup.py develop in the directory chipwhisperer/openadc/controlsw/python$ python i take the message:

Checking .pth file support in /usr/local/lib/python2.7/dist-packages/
error: can’t create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

[Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/test-easy-install-3214.pth'

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

/usr/local/lib/python2.7/dist-packages/

Perhaps your account does not have write access to this directory? If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or “root” account. If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.

For information on other options, you may wish to consult the
documentation at:

packages.python.org/distribute/easy_install.html

Please make the appropriate changes for your system and try again.

could anyone help me of how to overcome this error?
thanks!

Hi papafra,

The error message says most of what you need to do to fix the problem. Because you are installing to your system wide python you need root permissions. You can try running the setup again but with sudo with the -H flag enabled (more info here)

 sudo -H python setup.py develop

You could also fix the issue by setting up a virtual python environment and doing the install with this virtual environment active. Then you have an isolated python install where changes do not affect your system wide python. This you will have to read about yourself as there are tons of resources about how to use virtual environments out there, so there is no reason for me to repeat it here (it would just make this post much to long, and other resources would have much more detail). Just use a search engine to search “python virtual environment”.

Hope this helps!

Cheers,
Franz