简体   繁体   English

'pip2' 未被识别为内部或外部命令

[英]'pip2' is not recognized as an internal or external command

I am trying to run a python script on my windows 10 computer using Python 2.7.我正在尝试使用 Python 2.7 在我的 Windows 10 计算机上运行 Python 脚本。

I run the ff command:我运行 ff 命令:

python boxtool.py

Then I got the ff errors:然后我得到了 ff 错误:

'pip2' is not recognized as an internal or external command,
operable program or batch file.
'pip2' is not recognized as an internal or external command,
operable program or batch file.
Traceback (most recent call last):
  File boxtool.py", line 14, in <module>
    from requests.exceptions import ConnectionError
ImportError: No module named requests.exceptions

Looking at the code, here are the codes in line 14:查看代码,这里是第14行的代码:

except ImportError:
    os.system("pip2 install requests")
from requests.exceptions import ConnectionError
from mechanize import Browser

I am new in Python.我是 Python 新手。 Can anyone tell me how to fix this?谁能告诉我如何解决这个问题?

Download the get-pip.py file: get-pip.py on pypa.io下载get-pip.py文件:pypa.io 上的get-pip.py

Then install it using python然后使用python安装它

python get-pip.py

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 'pip' 未被识别为内部或外部命令 - 'pip' is not recognized as an internal or external command pip 在 windows7 中未被识别为内部或外部命令 - pip is not recognized as an internal or external command in windows7 无法解决“ pip”问题的方法未被识别为内部或外部命令 - No way to fix 'pip' is not recognized as an internal or external command Python 2.7 &#39;Pip&#39; 不被识别为内部或外部命令 - Python 2.7 'Pip' is not recognized as an internal or external command &#39;pip3&#39; 不是内部或外部命令,也不是可运行的程序或批处理文件 - 'pip3' is not recognized as an internal or external command, operable program or batch file &#39;pip&#39;不被识别为内部或外部命令,可操作程序或批处理文件 - 'pip' is not recognized as an internal or external command, operable program or batch file 使用 pip Python 2.7 - Pipe 未被识别为内部或外部命令 - Using pip Python 2.7 - Pipe not recognized as an internal or external command 在Windows 7上安装TensorFlow - &#39;pip3&#39;不被识别为内部或外部命令, - Installation of TensorFlow on windows 7 - 'pip3' is not recognized as an internal or external command, pip 不是内部或外部命令,也不是可运行的程序或批处理文件 - pip is not recognized as an internal or external command, operable program or batch file 点不被识别为内部或外部命令(即使添加了PATH变量之后) - Pip not recognized as internal or external command (even after adding PATH variables)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM