python: 无法打开文件 get-pip.py 错误 2] 没有这样的文件或目录
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/39790923/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
python: can't open file get-pip.py error 2] no such file or directory
提问by Muhammad Faizan Khan
When I am trying to execute this in CMD
当我尝试在 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
python: can't open file get-pip.py error 2] no such file or directory
While the file store in (get-pip.py)
虽然文件存储在 (get-pip.py) 中
C:\Python27\Tools\Scripts
C:\Python27\工具\脚本
采纳答案by vovaminiof
Try to either cd
into folder with script (cd "C:\Python27\Tools\Scripts"
) or add this folder to your PATH variable.
尝试cd
使用脚本 ( cd "C:\Python27\Tools\Scripts"
)进入文件夹或将此文件夹添加到您的 PATH 变量。
回答by Denis Rybalka
For Linux/Mac, you can go for
对于 Linux/Mac,你可以去
curl 'https://bootstrap.pypa.io/get-pip.py' > get-pip.py && sudo python get-pip.py
- Fetching installer
- Executing file with superuser access
- 正在获取安装程序
- 以超级用户权限执行文件
回答by Hyman_1729
Go to this link - https://www.liquidweb.com/kb/how-to-install-pip-on-ubuntu-14-04-lts/
转到此链接 - 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
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
所以帖子中有一个错误作为命令
pip --help
will not work.
不管用。
vagrant@vagrant-ubuntu-trusty-64:/vagrant$ pip --help
-bash: /usr/bin/pip: No such file or directory
vagrant@vagrant-ubuntu-trusty-64:/vagrant$ pip --help
-bash: /usr/bin/pip: No such file or directory
But you still have pip installed.
但是你仍然安装了pip。
Enjoy!
享受!