欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

TensorFlow安装bug集锦

程序员文章站 2022-06-01 14:06:22
...

TensorFlow安装bug集锦【updating…】

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) aaa@qq.com:~/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) aaa@qq.com:~/tensorflow/bin$

截图如下:
TensorFlow安装bug集锦TensorFlow安装bug集锦

相关标签: # TensorFlow ML