ModuleNotFoundError: No module named 'tensorflow.python.saved_model.model_utils'

ModuleNotFoundError: No module named 'tensorflow.python.saved_model.model_utils'

出现原因:升级了tensorflow2.0,退回1.13出现该问题。

解决方法:删除tensorflow_estimator重新安装

pip uninstall tensorflow_estimator
pip install tensorflow_estimator
发布了155 篇原创文章 · 获赞 23 · 访问量 2万+
展开阅读全文

ImportError: No module named '_pywrap_tensorflow_internal'

11-05

tensorflow==1.5.0 安装成功;继续安装gpu版本,按系统提示再安装 CUDA-9.0, cuDNN-7.0: cuda_9.0.176_win10_network以及patch1-4 / cudnn-9.0-windows10-x64-v7.3.1.20. 运行‘import tensorflow as tf’后报错: ImportError: No module named '_pywrap_tensorflow_internal' 谢谢帮助 --------------------------------------------------------------------------- ImportError Traceback (most recent call last) C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py in swig_import_helper() 17 try: ---> 18 return importlib.import_module(mname) 19 except ImportError: C:\Program Files\Anaconda3\lib\importlib\__init__.py in import_module(name, package) 125 level += 1 --> 126 return _bootstrap._gcd_import(name[level:], package, level) 127 C:\Program Files\Anaconda3\lib\importlib\_bootstrap.py in _gcd_import(name, package, level) C:\Program Files\Anaconda3\lib\importlib\_bootstrap.py in _find_and_load(name, import_) C:\Program Files\Anaconda3\lib\importlib\_bootstrap.py in _find_and_load_unlocked(name, import_) C:\Program Files\Anaconda3\lib\importlib\_bootstrap.py in _load_unlocked(spec) C:\Program Files\Anaconda3\lib\importlib\_bootstrap.py in module_from_spec(spec) C:\Program Files\Anaconda3\lib\importlib\_bootstrap_external.py in create_module(self, spec) C:\Program Files\Anaconda3\lib\importlib\_bootstrap.py in _call_with_frames_removed(f, *args, **kwds) ImportError: DLL load failed: 找不到指定的程序。 During handling of the above exception, another exception occurred: ImportError Traceback (most recent call last) C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py in <module>() 57 ---> 58 from tensorflow.python.pywrap_tensorflow_internal import * 59 from tensorflow.python.pywrap_tensorflow_internal import __version__ C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py in <module>() 20 return importlib.import_module('_pywrap_tensorflow_internal') ---> 21 _pywrap_tensorflow_internal = swig_import_helper() 22 del swig_import_helper C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py in swig_import_helper() 19 except ImportError: ---> 20 return importlib.import_module('_pywrap_tensorflow_internal') 21 _pywrap_tensorflow_internal = swig_import_helper() C:\Program Files\Anaconda3\lib\importlib\__init__.py in import_module(name, package) 125 level += 1 --> 126 return _bootstrap._gcd_import(name[level:], package, level) 127 ImportError: No module named '_pywrap_tensorflow_internal' During handling of the above exception, another exception occurred: ImportError Traceback (most recent call last) <ipython-input-1-41389fad42b5> in <module>() ----> 1 import tensorflow as tf C:\Program Files\Anaconda3\lib\site-packages\tensorflow\__init__.py in <module>() 22 23 # pylint: disable=wildcard-import ---> 24 from tensorflow.python import * 25 # pylint: enable=wildcard-import 26 C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\__init__.py in <module>() 47 import numpy as np 48 ---> 49 from tensorflow.python import pywrap_tensorflow 50 51 # Protocol buffers C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py in <module>() 72 for some common reasons and solutions. Include the entire stack trace 73 above this error message when asking for help.""" % traceback.format_exc() ---> 74 raise ImportError(msg) 75 76 # pylint: enable=wildcard-import,g-import-not-at-top,unused-import,line-too-long ImportError: Traceback (most recent call last): File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper return importlib.import_module(mname) File "C:\Program Files\Anaconda3\lib\importlib\__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 986, in _gcd_import File "<frozen importlib._bootstrap>", line 969, in _find_and_load File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 666, in _load_unlocked File "<frozen importlib._bootstrap>", line 577, in module_from_spec File "<frozen importlib._bootstrap_external>", line 906, in create_module File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed ImportError: DLL load failed: 找不到指定的程序。 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module> from tensorflow.python.pywrap_tensorflow_internal import * File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 21, in <module> _pywrap_tensorflow_internal = swig_import_helper() File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper return importlib.import_module('_pywrap_tensorflow_internal') File "C:\Program Files\Anaconda3\lib\importlib\__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ImportError: No module named '_pywrap_tensorflow_internal' Failed to load the native TensorFlow runtime. See https://www.tensorflow.org/install/install_sources#common_installation_problems for some common reasons and solutions. Include the entire stack trace above this error message when asking for help. 问答

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 大白 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览