繁体   English   中英

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

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

我正在尝试使用 Python 2.7 在我的 Windows 10 计算机上运行 Python 脚本。

我运行 ff 命令:

python boxtool.py

然后我得到了 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

查看代码,这里是第14行的代码:

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

我是 Python 新手。 谁能告诉我如何解决这个问题?

下载get-pip.py文件:pypa.io 上的get-pip.py

然后使用python安装它

python get-pip.py

暂无
暂无

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM