Python pip install 给我这个错误“无法打开文件‘pip’:[Errno 2]没有这样的文件或目录”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/42602059/
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
pip install gives me this error "can't open file 'pip': [Errno 2] No such file or directory"
提问by Bipin Shetty
I have tried using pip -m install win32api
, but I still get the error "can't open file 'pip': [Errno 2] No such file or directory"
我试过使用pip -m install win32api
,但我仍然收到错误“无法打开文件'pip':[Errno 2]没有这样的文件或目录”
Can anyone help me on this?
谁可以帮我这个事?
Note: I have renamed the python.exe file as python2 and python3, since I have both versions installed on my pc.
注意:我已将 python.exe 文件重命名为 python2 和 python3,因为我的电脑上安装了这两个版本。
回答by Paandittya
python -m pip install pypiwin32
This should solve the issue. Note that the package name you used is not the canonical name.
这应该可以解决问题。请注意,您使用的包名称不是规范名称。
回答by PatXio
Depending on your python interpreter environment variable path, you need to either py -m pip install win32api
根据您的python解释器环境变量路径,您需要 py -m pip install win32api
or
或者
Use python -m pip install win32api
用 python -m pip install win32api
In my case, py -m pip install win32api
worked but python -m pip install win32api
didn't
就我而言,py -m pip install win32api
工作但python -m pip install win32api
没有
回答by Nicola Spanu
I had the same error message while trying to lunch the command "manage.py". I solved the problem by writing the command in python shell after entering the folder where the files django-admin.exe and django-admin.py are. Please see screen-shot attached.
我在尝试使用命令“manage.py”时遇到相同的错误消息。我在进入文件 django-admin.exe 和 django-admin.py 所在的文件夹后,通过在 python shell 中编写命令解决了问题。请参阅附带的屏幕截图。