unix上的Python3和pip3

时间:2015-02-23 12:05:34

标签: python unix

我正在尝试在unix上安装3.4 python和pip3。然而,似乎pip3安装在3.2。

当我运行Python3 --version时,它返回

Python 3.4.1

然而,当我运行pip3 --version

pip 6.0.8 from /usr/local/lib/python3.2/dist-packages/pip-6.0.8-py3.2.egg (python 3.2)

然后我通过编辑这个来尝试在python 3.4上指向pip3:

 nano /usr/bin/pip3

然后插入

#!/usr/bin/python3.4

因此,当我在此之后尝试安装请求时,它说它总是安装在3.2上。但是我想在3.4

上运行
pip3 install requests

返回

Requirement already satisfied (use --upgrade to upgrade): requests in /usr/local/lib/python3.2/dist-packages 

我怎样才能指出3.4而不是3.2?

输出

lrwxrwxrwx 1 root root       9 feb 17 08:52 /usr/bin/python -> python2.7
lrwxrwxrwx 1 root root       9 feb 17 08:52 /usr/bin/python2 -> python2.7
-rwxr-xr-x 1 root root 2993744 feb 27  2014 /usr/bin/python2.7
-rwxr-xr-x 1 root root    1652 feb 27  2014 /usr/bin/python2.7-config
lrwxrwxrwx 1 root root      16 feb 17 08:53 /usr/bin/python2-config -> python2.7-config
lrwxrwxrwx 1 root root       9 apr 10  2013 /usr/bin/python3 -> python3.2
lrwxrwxrwx 1 root root      11 feb 27  2014 /usr/bin/python3.2 -> python3.2mu
lrwxrwxrwx 1 root root      18 feb 27  2014 /usr/bin/python3.2-config -> python3.2mu-config
-rwxr-xr-x 1 root root 2954048 feb 27  2014 /usr/bin/python3.2mu
-rwxr-xr-x 1 root root    1820 feb 27  2014 /usr/bin/python3.2mu-config
lrwxrwxrwx 1 root root      16 apr 10  2013 /usr/bin/python3-config -> python3.2-config
lrwxrwxrwx 1 root root      11 apr 10  2013 /usr/bin/python3mu -> python3.2mu
lrwxrwxrwx 1 root root      18 apr 10  2013 /usr/bin/python3mu-config -> python3.2mu-config
lrwxrwxrwx 1 root root      16 feb 17 08:53 /usr/bin/python-config ->     python2.7-config

0 个答案:

没有答案