在python中安装tensorflow出现错误“ERROR: Exception: Traceback (most recent call last): File……“,等系列问题

人工智能136

在python中安装tensorflow出现错误:
"ERROR: Exception: Traceback (most recent call last): File...",
"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.",
"ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'"
系列问题,最终解决,成功安装。

开始:没有安装tensorflow时运行出错:
在python中安装tensorflow出现错误“ERROR: Exception: Traceback (most recent call last): File……“,等系列问题
问题1:开始安装,
pip install --upgrade --ignore-installed tensorflow
出现ERROR: Exception:Traceback (most recent call last):......接着一大堆报错:
在python中安装tensorflow出现错误“ERROR: Exception: Traceback (most recent call last): File……“,等系列问题
解决步骤:参考帖子:https://blog.csdn.net/Vertira/article/details/106287412,因为网速问题,推荐用镜像网站更新:https://pypi.douban.com/simple。因此采用下述命令继续下载安装,进度条很快。
pip install tensorflow==1.13.1 -i https://pypi.douban.com/simple
问题2:但是在即将下载安装时,出现了新的问题:
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.

解决步骤:参考帖子:https://blog.csdn.net/The_Time_Runner/article/details/96439791,使用命令:
pip install -U --ignore-installed wrapt enum34 simplejson netaddr
然后再进行上一步骤的安装,显示安装成功。
在python中安装tensorflow出现错误“ERROR: Exception: Traceback (most recent call last): File……“,等系列问题
问题3:用import tensorflow as tf测试是否安装成功时,发现新问题:
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'
在python中安装tensorflow出现错误“ERROR: Exception: Traceback (most recent call last): File……“,等系列问题
解决步骤:更新numpy,注意这里还是用到了上面推荐的镜像网站,否则因为网速中断。
安装成功!
pip install -user -update numpy -i https://pypi.douban.com/simple
在python中安装tensorflow出现错误“ERROR: Exception: Traceback (most recent call last): File……“,等系列问题

Original: https://blog.csdn.net/qq_21561539/article/details/122642675
Author: 兔兔猿
Title: 在python中安装tensorflow出现错误“ERROR: Exception: Traceback (most recent call last): File......“,等系列问题

Original: https://blog.csdn.net/qq_21561539/article/details/122642675
Author: 兔兔猿
Title: 在python中安装tensorflow出现错误“ERROR: Exception: Traceback (most recent call last): File......“,等系列问题