[英]Installing pip for Python 3.4 - Mac OS X
as you know the Mac comes with Python pre-installed, mine has the 2.7 version. 如你所知,Mac预装了Python,我有2.7版本。 I installed Python 3.4.
我安装了Python 3.4。 I installed pip using the command sudo easy_install however it gets installed to the 2.7 version of Python and all the packages i download therefore get installed to the 2.7 version.
我使用命令sudo easy_install安装了pip ,但它安装到2.7版本的Python,因此我下载的所有软件包都安装到2.7版本。 Is there a way to install pip to the Python 3.4 version?
有没有办法将pip安装到Python 3.4版本? Thank you in advance!
先感谢您!
I installed Python 3.4 for my Mac from this page: 我从这个页面为我的Mac安装了Python 3.4:
https://www.python.org/download/ https://www.python.org/download/
It installed pip automatically, but it's called pip3
, not pip
. 它自动安装了pip,但它被称为
pip3
,而不是pip
。 Type which pip3
at the console to find it. 在控制台
which pip3
以找到它。
If you're not averse to using a third-party package manager, the easiest way I've found to deal with 3.x on OS X is to use Homebrew . 如果您不反对使用第三方软件包管理器,我发现在OS X上处理3.x的最简单方法是使用Homebrew 。 You can maintain custom 2.x and 3.x installations (with
pip
and pip3
and everything else) alongside the system 2.7 installation with no problems. 您可以在系统2.7安装的同时维护自定义2.x和3.x安装 (使用
pip
和pip3
以及其他所有内容),没有任何问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.