【发布时间】:2017-03-16 12:09:13
【问题描述】:
我最近使用 pip 在 python 2.7 中安装 requests 包,但是为了这样做我不得不使用:
python -m pip install requests
而不仅仅是:
python pip install requests
这给了我一个错误:
无法打开文件 'pip: [Errno 2] 没有这样的文件或目录
为什么我需要添加-m?
【问题讨论】:
-
这些是您使用的完整命令吗? (我怀疑不是)你有
python在这些前面吗? -
我做到了,整个命令是 > python -m pip install requests
标签: python-2.7 pip