最后的错误提示是:“importerror dll load failed:找不到指定的程”。注意,一定是最后的错误提示是这个!不过是中途提示,参看其它的`]]
j解决方法:使用管理员身份打开cmd.exe(也就是windos界面),然后确保网络良好的情况下输入:pip install protobuf==3.6.0然后回车即可。如果提示pip不是内部指令,点击这里 https://blog.csdn.net/qq_29371155/article/details/105074987
错误二:
C:\Users\x\AppData\Local\Programs\Python\Python36\python.exe D:/pycharm2/20200319/ 0319.py
Traceback (most recent call last):
File “C:\Users\x\AppData\Roaming\Python\Python36\site-packages\tensorflow_core\python\pywrap_ tensorflow.py”, line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File “C:\Users\x\AppData\Roaming\Python\Python36\site-packages\tensorflow_core\python\pywrap_tensorflow_ internal.py”, line 28, in
pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\x\AppData\Roaming\Python\Python36\site-packages\tensorflow_core\python\pywrap_tensorflow internal.py", line 24, in swig_import_helper
_mod = imp.load_module(’_pywrap_tensorflow_internal’, fp, pathname, description)
File “C:\Users\x\AppData\Local\Programs\Python\Python36\lib\ imp.py”, line 243, in load_module
return load_dynamic(name, filename, file)
File “C:\Users\x\AppData\Local\Programs\Python\Python36\lib\ imp.py”, line 343, in load_dynamic
return _load(spec)
ImportError: DLL load failed: 找不到指定的模块。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “D:/pycharm2/20200319/ 0319.py”, line 1, in
import tensorflow
File “C:\Users\x\AppData\Roaming\Python\Python36\site-packages\tensorflow_init_.py”, line 101, in
from tensorflow_core import *
File “C:\Users\x\AppData\Roaming\Python\Python36\site-packages\tensorflow_core_init_.py”, line 40, in
from tensorflow.python.tools import module_util as module_util
File "C:\Users\x\AppData\Roaming\Python\Python36\site-packages\tensorflow_init.py", line 50, in getattr
module = self.load()
File "C:\Users\x\AppData\Roaming\Python\Python36\site-packages\tensorflow_init.py", line 44, in load
module = importlib.import_module(self.name)
File "C:\Users\x\AppData\Local\Programs\Python\Python36\lib\importlib_init.py", line 126, in import_module
return bootstrap.gcd_import(name[level:], package, level)
File "C:\Users\ \AppData\Roaming\Python\Python36\site-packages\tensorflow_core\python_init.py", line 49, in
from tensorflow.python import pywrap_tensorflow
File "C:\Users\x\AppData\Roaming\Python\Python36\site-packages\tensorflow_core\python\pywrap tensorflow.py", line 74, in
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\x\AppData\Roaming\Python\Python36\site-packages\tensorflow_core\python\pywrap tensorflow.py", line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File “C:\Users\x\AppData\Roaming\Python\Python36\site-packages\tensorflow_core\python\pywrap_tensorflow_ internal.py”, line 28, in
pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\x\AppData\Roaming\Python\Python36\site-packages\tensorflow_core\python\pywrap_tensorflow internal.py", line 24, in swig_import_helper
_mod = imp.load_module(’_pywrap_tensorflow_internal’, fp, pathname, description)
File “C:\Users\x\AppData\Local\Programs\Python\Python36\lib\ imp.py”, line 243, in load_module
return load_dynamic(name, filename, file)
File “C:\Users\x\AppData\Local\Programs\Python\Python36\lib\ imp.py”, line 343, in load_dynamic
return _load(spec)
ImportError: DLL load failed: 找不到指定的模块。
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/errors
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
Process finished with exit code 1
或者出现
moduleNotFoundError:No module named ‘tensorflow.python.platform’
解决方法:尝试降低tensorflow的版本。如1.13(这里感谢胡文仙和何瑞提供的帮助)
错误三:出现no module name tensorflow
解决方法:检查环境变量是否有问题!
其它错误:参考一些网友帖子,链接如下:
http://www.manongjc.com/article/32655.html
https://www.cnblogs.com/jfdwd/p/11178969.html