win10 Tensorflow(CPU版) ERROR: Exception: Traceback (most recent call last)
tensorflow安装成功后,去激活一下,紧接着输入:“activate tensorflow”,切换了,就代表安装成功了。
然后要安装CPU/GPU版本。
首先要查看自己的电脑显卡是A卡还是D卡。AMD显卡只能安装cpu版本,不能安装gpu版本。萌新用CPU版本就行了,安装也较简单。以下是查看步骤
开头第一个字母就是A/D卡
我安装的是CPU版本,那么在命令下输入:
pip install tensorflow
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tensorflow
pip install tensorflow -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install -i
https://pypi.tuna.tsinghua.edu.cn/simple/https://mirrors.tuna.tsinghua.edu.cn/tensorflow/windows/cpu/tensorflow-1.1.0-cp35-cp35m-win_amd64.whl
发现都是原来的错误
我猜测是网速的问题及网址更换了的问题,找了好多命令,用了豆瓣的成功了。
pip install tensorflow -i https://pypi.douban.com/simple
python -m pip install --upgrade pip -i https://pypi.douban.com/simple
由于版本的不断更替,导致网上的教程仅仅适用于当时的TensorFlow版本,要降低版本
pip install tensorflow==1.4
import tensorflow
后又出现了新的问题
解决办法
对h5py进行更新升级
pip install h5py==2.8.0rc1
然后就成功啦~