python: can't open file get-pip.py error 2] no such file or directory

纵然是瞬间 提交于 2019-12-19 08:33:26

问题


When I am trying to execute this in CMD

python get-pip.py

I am getting this error:

python: can't open file get-pip.py error 2] no such file or directory

While the file store in (get-pip.py)

C:\Python27\Tools\Scripts


回答1:


Try to either cd into folder with script (cd "C:\Python27\Tools\Scripts") or add this folder to your PATH variable.




回答2:


For Linux/Mac, you can go for

curl 'https://bootstrap.pypa.io/get-pip.py' > get-pip.py && sudo python get-pip.py
  1. Fetching installer
  2. Executing file with superuser access



回答3:


Go to this link - https://www.liquidweb.com/kb/how-to-install-pip-on-ubuntu-14-04-lts/

For me it installed in

vagrant@vagrant-ubuntu-trusty-64:/vagrant$ which pip /usr/local/bin/pip

So there is a mistake in the post as the command pip --help

will not work.

vagrant@vagrant-ubuntu-trusty-64:/vagrant$ pip --help -bash: /usr/bin/pip: No such file or directory

But you still have pip installed.

Enjoy!



来源:https://stackoverflow.com/questions/39790923/python-cant-open-file-get-pip-py-error-2-no-such-file-or-directory

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!