简体   繁体   English

无法在Mac OSX上使用pip在Python 2.7.5中安装任何内容

[英]Cannot use pip to install anything in Python 2.7.5, on Mac OSX

This is starting to get really frustrating. 这开始变得非常令人沮丧。 I simply want to use pip to install packages for Python, however NOTHING I do seems to work, and NOTHING recognizes pip! 我只是想使用pip为Python安装软件包,但是我似乎没有用,NOTHING可以识别pip!

  • I am on Mac OSX, 10.9.5. 我使用的是Mac OSX 10.9.5。
  • I installed Python 2.7.5 via brew. 我通过brew安装了Python 2.7.5。
  • I went through this website and installed virtualenv. 我浏览了这个网站并安装了virtualenv。

Now. 现在。 I want to use pip to start to install packages for Python. 我想用pip开始安装Python的包。 How exactly do I do that? 我到底该怎么做? In the command line when I type: 在我输入的命令行中:

$ pip install numpy $ pip install numpy

I get: 我明白了:

-bash: pip: command not found -bash:pip:找不到命令

What is going on? 到底是怎么回事? Thanks. 谢谢。

pip has not yet been installed. pip尚未安装。 You can either download and install pip directly as per their documentation or run: 您可以根据文档直接下载并安装pip,也可以运行:

easy_install pip

... in your Terminal. ......在你的航站楼。 If that doesn't work, you may need to run it as a superuser. 如果这不起作用,您可能需要以超级用户身份运行它。 In that case, try sudo easy_install pip . 在这种情况下,请尝试sudo easy_install pip As of Python 3.4, pip is included. 从Python 3.4开始,包括pip

您需要安装pip:

easy_install pip

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

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