1.转载了博友:
Windows10下用Anaconda3安装TensorFlow教程
现在python3.6 已经支持tensorflow 故跟着上面的博主走,就可以安装好啦,不用看下面我踩了的坑。
2.安装过程出现了错误提示:
notebook 5.4.0 requires ipykernel, which isnot installed.
jupyter 1.0.0 requires ipykernel, which isnot installed.
jupyter-console 5.2.0 requires ipykernel,which is not installed.
ipywidgets 7.1.1 requiresipykernel>=4.5.1, which is not installed.
3.解决方法参考了:
用Anconada 安装 TensorFlow 1.7 的几个异常解决办法:EnvironmentError: [Errno 13] ;anEnvironmentError: [WinError 5]
安装:pip install notebook 出现红色提示:
tensorboard 1.8.0 has requirement bleach==1.5.0, but you'll have bleach 2.1.2 which is incompatible.
tensorboard 1.8.0 has requirement html5lib==0.9999999, but you'll have html5lib 1.0.1 which is incompatible.
解决方法参考了:博友https://blog.csdn.net/u010327061/article/details/80150106
- pip install tensorflow-tensorboard
4. 结束之后验证是否安装成功是,还是出错。查了百度之后。
>>> import tensorflow as tf
G:\Anaconda3\lib\site-packages\h5py\__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
from ._conv import register_converters as _register_converters
>>>
知道原因是:
tensorflow只支持python3.5版本的,不支持3.6的,而我安装了最新的版本3.6
解决方法参考了:
win10下anaconda安装tensorflow找不到包:Could not find a version that satisfies the requirement tensorflow (from versions: )
和 怎么配置3.5环境,参考了:
windows下配置安装Anaconda+tensorflow
cmd:conda create --name python35 python=3.5
然后激活py35: conda activate python35
之后就可以开始在py35下安装啦:
cpu版本:pip install --ignore-installed --upgrade tensorflow
图示: