tensorflow运行出错 ERROR:root:Internal Python error in the inspect module

导入模块,运行出现以下错误
使用pip install tensorflow 默认安装的是tensorflow 2.0
tensorflow运行出错 ERROR:root:Internal Python error in the inspect module_第1张图片
往下拉可以看到各种: ImportError: DLL load failed: 找不到指定的模块
tensorflow运行出错 ERROR:root:Internal Python error in the inspect module_第2张图片
查看官网可以看到相关说明
tensorflow运行出错 ERROR:root:Internal Python error in the inspect module_第3张图片

卸载最新的tensorflow 2.0

pip uninstall tensorflow -y

安装tensorflow1.x版本,这里安装的是1.13.1
注意,不要安装1.15版本,因为1.15安装之后会出现:No module named 'tensorflow.contrib' 的错误

pip install tensorflow==1.13.1

下载太慢的话,可以使用源,我使用豆瓣源多一些:

pip install tensorflow==1.13.1 -i https://pypi.doubanio.com/simple/

安装完成之后,问题解决

你可能感兴趣的:(笔记)