“Cannot access setup.py: No such file or directory” - can't run any .py files?

前端 未结 3 1761
故里飘歌
故里飘歌 2020-12-30 01:55

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: \

相关标签:
3条回答
  • 2020-12-30 02:25

    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.

    0 讨论(0)
  • 2020-12-30 02:27

    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

    0 讨论(0)
  • 2020-12-30 02:30

    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
    
    0 讨论(0)
提交回复
热议问题