为python3.3安装pip [英] Installing pip for python3.3

查看:725
本文介绍了为python3.3安装pip的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从包装索引> pip 1.2.1

然后我使用

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屋!

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