TensorFlow安裝bug集錦

TensorFlow安裝bug集錦

1.系統環境

- ubuntu
- python 2.7; python 3.5
- pip3

2.問題

參考TensorFlow官方社區給出的安裝教程時,執行到:
(tensorflow)$ pip install --upgrade <$url_to_binary.whl>時【注意需要將這後面的url 替換成具體的url,我當時還以爲這是腳本里會給出的值,哪知道腳本里並沒有給出來(還是我眼花,沒看到? )】,出現問題,報錯如下:

ERROR: tensorflow-0.8.0-cp34-cp34m-linux_x86_64.whl is not a supported wheel on this platform.

3.原因

出現上述這種問題,可能的原因有:

3.1 python 的版本不對

進入 ~/tensorflow下的文件夾,發現裏面的python版本指向是3.5的,【因爲之前朋友一直跟我說系統的python是2.7版本的,我自己也看了的確是。】所以就導致我在安裝的時候使用的是2.7版本【即cp27】,才導致上面這個問題的產生。更換鏈接之後,執行命令
sudo pip3 install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.3.0-cp35-cp35m-linux_x86_64.whl
安裝便成功了。

(tensorflow) liushen@aliyun-lc:~/tensorflow/bin$ sudo pip3 install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.3.0-cp35-cp35m-linux_x86_64.whl
WARNING: The directory '/home/liushen/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting tensorflow==1.3.0
  Downloading https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.3.0-cp35-cp35m-linux_x86_64.whl (43.1 MB)
     |????????????????????????????????| 43.1 MB 115 kB/s 
Requirement already satisfied, skipping upgrade: six>=1.10.0 in /usr/local/lib/python3.5/dist-packages (from tensorflow==1.3.0) (1.14.0)
Requirement already satisfied, skipping upgrade: wheel>=0.26 in /usr/lib/python3/dist-packages (from tensorflow==1.3.0) (0.29.0)
Requirement already satisfied, skipping upgrade: protobuf>=3.3.0 in /usr/local/lib/python3.5/dist-packages (from tensorflow==1.3.0) (3.11.3)
Requirement already satisfied, skipping upgrade: numpy>=1.11.0 in /usr/local/lib/python3.5/dist-packages (from tensorflow==1.3.0) (1.18.1)
Collecting tensorflow-tensorboard<0.2.0,>=0.1.0
  Downloading tensorflow_tensorboard-0.1.8-py3-none-any.whl (1.6 MB)
     |????????????????????????????????| 1.6 MB 8.4 kB/s 
Requirement already satisfied, skipping upgrade: setuptools in /usr/lib/python3/dist-packages (from protobuf>=3.3.0->tensorflow==1.3.0) (20.7.0)
Collecting bleach==1.5.0
  Downloading bleach-1.5.0-py2.py3-none-any.whl (17 kB)
Requirement already satisfied, skipping upgrade: werkzeug>=0.11.10 in /usr/local/lib/python3.5/dist-packages (from tensorflow-tensorboard<0.2.0,>=0.1.0->tensorflow==1.3.0) (1.0.0)
Requirement already satisfied, skipping upgrade: markdown>=2.6.8 in /usr/local/lib/python3.5/dist-packages (from tensorflow-tensorboard<0.2.0,>=0.1.0->tensorflow==1.3.0) (3.2.1)
Collecting html5lib==0.9999999
  Downloading html5lib-0.9999999.tar.gz (889 kB)
     |????????????????????????????????| 889 kB 10 kB/s 
Building wheels for collected packages: html5lib
  Building wheel for html5lib (setup.py) ... done
  Created wheel for html5lib: filename=html5lib-0.9999999-py3-none-any.whl size=111289 sha256=4fe62a8b9911addae3cc1c74cc1c16802fd70b47d16b8f2fa4728ce0ea2a7dab
  Stored in directory: /tmp/pip-ephem-wheel-cache-_sbptdyi/wheels/5c/93/0e/45057f13b26ba880ba315b4b580d52ca76151fa88aa5db6db8
Successfully built html5lib
Installing collected packages: html5lib, bleach, tensorflow-tensorboard, tensorflow
  Attempting uninstall: bleach
    Found existing installation: bleach 3.1.0
    Uninstalling bleach-3.1.0:
      Successfully uninstalled bleach-3.1.0
Successfully installed bleach-1.5.0 html5lib-0.9999999 tensorflow-1.3.0 tensorflow-tensorboard-0.1.8
(tensorflow) liushen@aliyun-lc:~/tensorflow/bin$

截圖如下:
在這裏插入圖片描述在這裏插入圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章