Skip to content Skip to sidebar Skip to footer

"Cannot Access Setup.py: No Such File Or Directory" - Can't Run Any .py Files?

This problem started while I was installing pyswip and needed to run a setup.py file. Using the command 'python setup.py', I'm greeted with the following message: 'python: can't op

Solution 1:

When you run python setup.py that requires the setup.py file to be in the current directory.

You can control the current directory with the cd command.

So:

cd /home/acacia/Python-3.3.0/PySwip/pyswip-0.2.3
python setup.py install

Solution 2:

I have no knowledge about Elementary OS but you could try to use the full path of the setup.py.

python /home/acacia/Python-3.3.0/PySwip/pyswip-0.2.3/setup.py install

[EDIT] Can't answer comments, so I just added the install parameter in my answer


Solution 3:

You need to go into the directory that you are going to "setup". For example, if you are installing numpy, and you have git-cloned it, then it probably is located at ~/numpy. So first cd into ~/numpy, and the type the commend like "python setup.py build" there.


Post a Comment for ""Cannot Access Setup.py: No Such File Or Directory" - Can't Run Any .py Files?"