Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

python: can't open an existing file even if the path has already been clearly added

Tags:

python

I am using python 2.7.11 and I have downloaded setuptools-2.2 for its included setup.py file. Then I did a python setup.py install (This command is successful), and I added the path for this setup.py file to ~/.bash_profile.

export PATH=/opt/python2711/lib/python2.7/site-packages/:$PATH
export PATH=/path-to-setuptools/setuptools-2.2/:$PATH

However, when I tried to install another software (./pybombs install uhd), my computer kept complaining:

Build failed. Re-trying with reduced makewidth and higher verbosity.
python: can't open file 'setup.py': [Errno 2] No such file or directory

I actually tried to add the path of that egg file as well, but it couldn't help either. I don't know much about this setup.py file. Could somebody point out how to fix this compiling error?

Thanks in advance!

like image 397
Cindy Avatar asked Nov 30 '25 00:11

Cindy


1 Answers

add your path in ~/.profile export PATH=$PATH:/path/to/dir ~/.profile: executed by the command interpreter for login shells.

how ever the path variable is in

/etc/environment : file open and add the path here you should log in as root

like image 116
Ankanna Avatar answered Dec 02 '25 13:12

Ankanna



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!