[英]'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.