解決方法安裝PIP我的用戶沒有自己的權限點子目錄,我重新安裝的Python 3.5使用sudo -H
標誌爲Python 3.5
我試圖安裝Tensorflow爲Python 3.5使用PIP 3 - 原因在this github問題描述 - 但是當我安裝使用sudo pip3 install *.whl
它安裝到python 3.4。
如何將pip3
重定向到我的python 3.5目錄?
我在Ubuntu 14.04
[email protected]:~/Downloads$ python3.4 -m pip --version
pip 8.1.2 from /usr/local/lib/python3.4/dist-packages/pip-8.1.2-py3.4.egg (python 3.4)
[email protected]:~/Downloads$ python3.5 -m pip --version
/usr/local/bin/python3.5: No module named pip
運行它看起來像我甚至不已經安裝了蟒蛇3.5點子。我怎樣才能做到這一點?
我已經試過
[email protected]:~/Downloads$ pip install -U pip
Requirement already up-to-date: pip in /usr/local/lib/python3.4/dist-packages/pip-8.1.2-py3.4.egg
此外,
[email protected]:~/Downloads$ whereis pip
pip: /usr/bin/pip /usr/bin/X11/pip /usr/local/bin/pip3.4 /usr/local/bin/pip /usr/local/bin/pip2.7 /usr/share/man/man1/pip.1.gz
我找不到任何升級支持pip3.5
UPDATE
[email protected]:~/Downloads$ sudo apt-get install python3-setuptools
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-setuptools is already the newest version.
The following packages were automatically installed and are no longer required:
libntdb1 linux-headers-4.2.0-27 linux-headers-4.2.0-27-generic
linux-image-4.2.0-27-generic linux-image-extra-4.2.0-27-generic
linux-signed-image-4.2.0-27-generic python-ntdb
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
[email protected]:~/Downloads$ sudo python3.5 easy_install.py pip
python3.5: can't open file 'easy_install.py': [Errno 2] No such file or directory
[email protected]:~/Downloads$ python3.5 -m ensurepip
Ignoring ensurepip failure: pip 8.1.1 requires SSL/TLS
[email protected]:~/Downloads$ sudo apt-get install pip3
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package pip3
[email protected]:~/Downloads$ sudo apt-get install libssl-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libssl-dev is already the newest version.
The following packages were automatically installed and are no longer required:
libntdb1 linux-headers-4.2.0-27 linux-headers-4.2.0-27-generic
linux-image-4.2.0-27-generic linux-image-extra-4.2.0-27-generic
linux-signed-image-4.2.0-27-generic python-ntdb
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
[email protected]:~/Downloads$ python3.5 -m ensurepip
Ignoring ensurepip failure: pip 8.1.1 requires SSL/TLS
所推薦的@fwalsh
[email protected]:~/Downloads$ python3.5 get-pip.py
Traceback (most recent call last):
File "get-pip.py", line 19177, in <module>
main()
File "get-pip.py", line 194, in main
bootstrap(tmpdir=tmpdir)
File "get-pip.py", line 82, in bootstrap
import pip
zipimport.ZipImportError: can't decompress data; zlib not available
好像我錯過了各種各樣的依賴 - 我要去嘗試重新安裝
https://pip.pypa.io/en/stable/installing/#installing-with-get-pip-py – fwalch
'pip已經是最新的' –
@fwalch我添加了更新,它似乎我缺少各種各樣的依賴關係 - 將嘗試重新安裝3.5 –