win10+python 3.7 + Anaconda
一、安装
第一步,下载与电脑版本对应的Anaconda,打开Anaconda Navigator,选择环境,创建新环境,我用的是python3.7,选择自己对应的版本。


第二步,打开prompt,输入 activate tensorflow,切换到tensorflow 模式,继续输入conda install tensorflow。
activate tensorflow
conda install tensorflow


二、验证
如果没什么问题,切换到python模式,验证一下。

三、问题
此次安装我断断续续花了好长时间,也用了很多方法进行安装,遇到过许多问题。将部分问题进行总结。
1.pip版本更新失败
python -m pip install --upgrade pip
有可能失败,多试几次,或者直接卸载,重新下载就是最新版本的了。
2.tensorflow下载速度太慢太慢,可以参考一下方法:
pip install tensorflow -i https://pypi.douban.com/simple
参考博客https://blog.csdn.net/lixuminglxm/article/details/81386521
3.ERROR: twisted 18.7.0 requires PyHamcrest>=1.9.0, which is not installed
参考博客:https://blog.csdn.net/HPU_CPD/article/details/91492550?locationNum=5&fps=1
我刚开始下载了出现ERROR: Twisted-19.10.0-cp38-cp38-win_amd64.whl is not a supported wheel on this platform.问题,原来是版本不一样,查看了一下我的python是3.7版本,所以需要下载cp37版本的。

成功了

4.ERROR: Cannot uninstall 'wrapt'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
pip install -U --ignore-installed wrapt
5.一定要保证你的python版本跟tensorflow环境的版本一致。
本文详细介绍了在Windows 10操作系统上使用Python 3.7和Anaconda环境安装TensorFlow的过程。从创建Anaconda环境开始,到激活并安装TensorFlow,再到验证安装是否成功。同时,文章还总结了安装过程中可能遇到的问题及解决方案,如pip版本更新失败、下载速度慢、版本不匹配等常见问题。

775

被折叠的 条评论
为什么被折叠?



