Python Forum
ModuleNotFoundError: No module named '_pywrap_tensorflow_internal' - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Data Science (https://python-forum.io/forum-44.html)
+--- Thread: ModuleNotFoundError: No module named '_pywrap_tensorflow_internal' (/thread-5951.html)



ModuleNotFoundError: No module named '_pywrap_tensorflow_internal' - rajeev1729 - Oct-30-2017

Using TensorFlow backend.
Error:
Traceback (most recent call last): File "C:\Python 3.6.3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper return importlib.import_module(mname) File "C:\Python 3.6.3\lib\importlib\__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 994, in _gcd_import File "<frozen importlib._bootstrap>", line 971, in _find_and_load File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 658, in _load_unlocked File "<frozen importlib._bootstrap>", line 571, in module_from_spec File "<frozen importlib._bootstrap_external>", line 922, in create_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed ImportError: DLL load failed: The specified module could not be found.
During handling of the above exception, another exception occurred:

Error:
Traceback (most recent call last): File "C:\Python 3.6.3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 41, in <module> from tensorflow.python.pywrap_tensorflow_internal import * File "C:\Python 3.6.3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 21, in <module> _pywrap_tensorflow_internal = swig_import_helper() File "C:\Python 3.6.3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper return importlib.import_module('_pywrap_tensorflow_internal') File "C:\Python 3.6.3\lib\importlib\__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ModuleNotFoundError: No module named '_pywrap_tensorflow_internal'
During handling of the above exception, another exception occurred:

Error:
Traceback (most recent call last): File "C:/Python 3.6.3/DataScience-Python3/cifar10keras/cifar10keras-master/6layerCNN.py", line 4, in <module> from keras.models import Sequential File "C:\Python 3.6.3\lib\site-packages\keras\__init__.py", line 3, in <module> from . import utils File "C:\Python 3.6.3\lib\site-packages\keras\utils\__init__.py", line 6, in <module> from . import conv_utils File "C:\Python 3.6.3\lib\site-packages\keras\utils\conv_utils.py", line 3, in <module> from .. import backend as K File "C:\Python 3.6.3\lib\site-packages\keras\backend\__init__.py", line 83, in <module> from .tensorflow_backend import * File "C:\Python 3.6.3\lib\site-packages\keras\backend\tensorflow_backend.py", line 1, in <module> import tensorflow as tf File "C:\Python 3.6.3\lib\site-packages\tensorflow\__init__.py", line 24, in <module> from tensorflow.python import * File "C:\Python 3.6.3\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module> from tensorflow.python import pywrap_tensorflow File "C:\Python 3.6.3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 52, in <module> raise ImportError(msg) ImportError: Traceback (most recent call last): File "C:\Python 3.6.3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper return importlib.import_module(mname) File "C:\Python 3.6.3\lib\importlib\__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 994, in _gcd_import File "<frozen importlib._bootstrap>", line 971, in _find_and_load File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 658, in _load_unlocked File "<frozen importlib._bootstrap>", line 571, in module_from_spec File "<frozen importlib._bootstrap_external>", line 922, in create_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed ImportError: DLL load failed: The specified module could not be found.
During handling of the above exception, another exception occurred:

Error:
Traceback (most recent call last): File "C:\Python 3.6.3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 41, in <module> from tensorflow.python.pywrap_tensorflow_internal import * File "C:\Python 3.6.3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 21, in <module> _pywrap_tensorflow_internal = swig_import_helper() File "C:\Python 3.6.3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper return importlib.import_module('_pywrap_tensorflow_internal') File "C:\Python 3.6.3\lib\importlib\__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ModuleNotFoundError: 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.


RE: ModuleNotFoundError: No module named '_pywrap_tensorflow_internal' - stpaulchuck - Jul-04-2018

[non cuda version]
this is all about your video chip/card and CPU compatibility with TF VERSION! Current version of Tensor Flow is 1.8 and it crashes on both my machines.

I have a win7 Gateway notebook using an I5 CPU and intel video chip. I have a desktop win7 unit with AMD Phenom II and AMD Radeon HD5450 video card. The I5 notebook requires V1.6 of TensorFlow and the desktop AMD unit takes V1.5. I don't have a GPU available for running ANN's so I don't know how that would affect it.

Here's the command line for PIP install: pip install --upgrade tensorflow==1.5.0 (or whatever other version you need). This will uninstall your current version and then install the indicated version.

Build or copy a small TensorFlow script and run it. Open a second command window and install a different version. I'd recommend starting at 1.5 and working your way up.