pip命令什么都不做 [英] pip command does nothing

查看:113
本文介绍了pip命令什么都不做的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚在Windows 10上安装了Python 2.7.10.
我已经将python和pip目录添加到了PATH中,如下所示:

I just installed Python 2.7.10 on windows 10.
I have added my python and pip directory to my PATH like so:

我的脚本"文件夹如下所示:

My Scripts folder looks like this:

我的问题是,当我在命令提示符下键入"pip"并按Enter时,即使我等待了几分钟,也绝对没有任何反应.如果我从PATH变量中删除Scripts目录,我只会收到错误消息,例如"pip无法识别为内部或外部命令". Python工作正常.我也尝试过重新安装pip和Python,但是发生相同的问题. 那么,有谁知道为什么pip不做任何事情?

My problem is, when I type in "pip" in command prompt and press enter absolutely nothing happens, even if I wait several minutes. If I remove the Scripts directory from the PATH variable I just get the error message like "pip not recognized as internal or external command". Python works fine. I have also tried to reinstall both pip and Python but the same problem occurs. So, does anyone have any idea about why pip does not do anything?

****当我说它什么都不做时,我的意思是说cmd挂起了,就像它在等待某些事情发生一样.光标一直闪烁.

** ** when I say it does not do anything, I mean the cmd "hangs", like if it is waiting for something to happen. The cursor just keeps on blinking.

推荐答案

一个正在起作用的命令正在编写:

One command that is bound to work is writing:

python -m pip install requests

之所以可行,是因为您将脚本调用交给了已知的python,而不是依赖于Windows的PATH环境变量,而这可能是躲闪的.

This works because you hand off the script invocation to python, which you know works, instead of relying on the PATH environment variable of windows, which can be dodgy.

除非需要在系统上安装C编译器,否则numpy之类的软件包需要构建c-扩展名,这些软件包无法与pip一起使用.可以在此问题中找到更多信息.

Packages like numpy that require c-extensions to be built, will not work with pip unless you have a C Compiler installed on your system. More information can be found in this question.

如果您像您所说的那样不熟悉python环境,那么让我向您保证,通过安装 Anaconda .

If you are, as you're saying, unfamiliar with the python environment, then let me assure you, you will have a better day by installing Anaconda.

Anaconda是完全免费的Python发行版(包括 商业用途和再分配).它包括300多个 适用于科学,数学,工程学和数据的最受欢迎的Python软件包 分析.

Anaconda is a completely free Python distribution (including for commercial use and redistribution). It includes more than 300 of the most popular Python packages for science, math, engineering, and data analysis.

Anaconda当然带有numpy.

Anaconda comes with numpy, of course.

这篇关于pip命令什么都不做的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆