为python3.3安装pip [英] Installing pip for python3.3
问题描述
然后我使用
sudo python3.3 setup.py install
仍然,当我尝试使用pip-3.3
时,终端会抱怨
Still, when I try to use pip-3.3
the terminal complains
-bash: pip-3.3: command not found
但是,pip-2.7
可以顺畅地工作.
However, pip-2.7
works swimmingly.
我也尝试过
curl -O http://python-distribute.org/distribute_setup.py
sudo python3.3 distribute_setup.py
sudo python3.3 -m easy_install pip
但是pip-3.3
仍然不起作用.
如何为Python 3.3安装pip?
What do I do to install pip for Python 3.3?
请注意,有一个相关的线程如何在Python 3中安装pip? ,但是答案仅仅是安装分发...,然后使用它来安装pip",这对我无济于事,因为我已经尝试过了,但是没有用.
Note that there is a related thread How to install pip with Python 3?, but the answer is just "Install distribute ... and then use that to install pip" which is not helpful to me because I have tried it and it did not work.
推荐答案
可能是pip
确实在某处安装成功.但是,某处可能不在您的PATH
上,因此您的shell(bash)不知道在哪里找到它.对我而言,pip-2.6
安装在以下位置:
Chances are that pip
did get installed successfully somewhere. However, somewhere is probably not on your PATH
and so you shell (bash) doesn't know where to find it. For me, pip-2.6
is installed in:
/Library/Frameworks/Python.framework/Versions/2.6/bin/
对您来说,这可能是一条相似的路径(只有3.3,而不是2.6).当然,添加到PATH
取决于Shell.在类似bash的shell上,您将使用export
;在类似csh的shell上,您将使用setenv
-为了方便起见,您可能希望在shell的初始化文件中进行更改(例如,~/.bashrc
或~/.bash_profile
或类似名称).
It is probably a similar path for you (only 3.3 instead of 2.6). Of course, adding to PATH
is shell dependent. On bash-like shells you'd use export
and on csh-like shells you'd use setenv
-- And for convenience, you'd probably want to make the change in your shell's initialization file (e.g ~/.bashrc
or ~/.bash_profile
or something similar).
这篇关于为python3.3安装pip的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!