pycharm2019.1.1安装tensorflow出现问题及解决方式(方法均来自网络,亲测有效)
pycharm2019.1.1安装tensorflow出现问题及解决方式
硬件版本
1.Anaconda3自带的python3.7(pycharm用的python环境是直接将Anaconda下的python加入的)
2.pycharm2019.1.1
出现问题及解决方法
在pycharm终端输入pip install tensorflow出现以下问题
1.tensorflow安装中出现的ERROR: twisted 18.7.0 requires PyHamcrest>=1.9.0, which is not installed.
解决方法:
1.下载对应的Twisted,下载地址:https://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted
2.通过Anaconda3的Anaconda Prompt进行安装
3.具体步骤:(1) cd 下载的文件地址,如本人的:cd F:\下载
(2)pip install Twisted-19.2.1-cp37-cp37m-win_amd64.whl
方法来自链接:https://blog.csdn.net/HPU_CPD/article/details/91492550
解决好上面问题后,再次pip install tensorflow,又出现第二个问题
2.ERROR: Cannot uninstall ‘wrapt’. It is a distutils installed project and thus we
解决方法:终端输入 pip install -U --ignore-installed wrapt enum34 simplejson netaddr
方法来自链接:https://blog.csdn.net/qq_37928340/article/details/101281492
3.Python 报错 AttributeError: module ‘tensorflow’ has no attribute ‘placeholder’
原因分析:
Tensorflow 1.x 版本提供placeholder,而 2.0版本暂时没有这个模块。
因此把Tensorflow 换回 1.x版本即可。
安装特定版本tensorflow代码(以我想降到的版本举例):
pip install tensorflow==1.13.1
原文链接https://blog.csdn.net/sinat_26811377/article/details/100774586
上一篇: WAMPSERVER服务器多站点配置
下一篇: 配置Apache服务器