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

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

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

在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时运行出错:

***问题1:***开始安装,
pip install --upgrade --ignore-installed tensorflow
出现ERROR: Exception:Traceback (most recent call last):……接着一大堆报错:

***解决步骤:***参考帖子: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
然后再进行上一步骤的安装,显示安装成功。

***问题3:***用import tensorflow as tf测试是否安装成功时,发现新问题:
ModuleNotFoundError: No module named ‘numpy.core._multiarray_umath’

***解决步骤:***更新numpy,注意这里还是用到了上面推荐的镜像网站,否则因为网速中断。
安装成功!
pip install -user -update numpy -i https://pypi.douban.com/simple

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/5711558.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-17
下一篇 2022-12-17

发表评论

登录后才能评论

评论列表(0条)

保存