繁体   English   中英

如何安装pip3 3.5版?

[英]How to install pip3 version 3.5?

我已经看到在Ubuntu 14.04上安装了pip3.5的一个版本,但是我不确定它的安装方式,因为似乎没有pip3.5可用。

我试过了 :

pip3 install --upgrade pip3==3.5
Collecting pip==3.5
  Could not find a version that satisfies the requirement pip==3.5 (from versions: 0.2, 0.2.1, 0.3, 0.3.1, 0.4, 0.5, 0.5.1, 0.6, 0.6.1, 0.6.2, 0.6.3, 0.7, 0.7.1, 0.7.2, 0.8, 0.8.1, 0.8.2, 0.8.3, 1.0, 1.0.1, 1.0.2, 1.1, 1.2, 1.2.1, 1.3, 1.3.1, 1.4, 1.4.1, 1.5, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.5.5, 1.5.6, 6.0, 6.0.1, 6.0.2, 6.0.3, 6.0.4, 6.0.5, 6.0.6, 6.0.7, 6.0.8, 6.1.0, 6.1.1, 7.0.0, 7.0.1, 7.0.2, 7.0.3, 7.1.0, 7.1.1, 7.1.2, 8.0.0, 8.0.1, 8.0.2, 8.0.3, 8.1.0, 8.1.1, 8.1.2, 9.0.0, 9.0.1)
No matching distribution found for pip==3.5

如何安装pip 3.5版?

更新:

我通过安装了numpy

pip3 install numpy
Requirement already satisfied (use --upgrade to upgrade): numpy in /usr/local/lib/python3.4/dist-packages

尝试在python3.5中使用numpy会导致错误:

/usr/local/bin/python3.5
Python 3.5.0 (default, Jan 20 2017, 10:14:23)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> import numpy as np
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named 'numpy'

但是安装了numpy:

pip3 install numpy
Requirement already satisfied (use --upgrade to upgrade): numpy in /usr/local/lib/python3.4/dist-packages

我错误地认为要修复,我应该更新到pip版本3.5以匹配python版本3.5。

所以现在的问题是如何将numpy安装到python 3.5版?

从这里https://pip.pypa.io/en/latest/installing/下载get-pip.py

然后使用您选择的python解释器:

python3.5 get-pip.py --user

然后,通过使用PIP与-m开关你确信是用来解释的。

python3.5 -m pip install --user numpy

编辑:我有一个正在工作的Ubuntu 14.04桌面,并且遇到了同样的问题,没有发现任何问题。

暂无
暂无

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

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