Python Forum
ModuleNotFoundError: No module named '_pywrap_tensorflow_internal'
Thread Rating:
  • 2 Vote(s) - 3.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ModuleNotFoundError: No module named '_pywrap_tensorflow_internal'
#1
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/insta...n_problems

for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
Larz60+ write Dec-01-2023, 09:17 AM:
Added error tags. bbcode is forum requirement.
Larz60+ write Jul-04-2023, 02:03 AM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Reply
#2
[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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Keras. ModuleNotFoundError: No module named 'error' agatte 1 7,061 Sep-18-2019, 12:27 PM
Last Post: shivani
  ModuleNotFoundError: No module named 'stop_words' knchris2004 6 12,732 Jul-04-2019, 10:31 PM
Last Post: snippsat
  No module named pip Viesturs 4 49,636 Jun-08-2018, 06:41 AM
Last Post: volcano63
  No module named scipy kirill 2 9,379 Mar-16-2018, 04:19 PM
Last Post: kirill
  ModuleNotFoundError: No module named 'adspy_shared_utilities' POOJASWAMY 0 8,152 Feb-09-2018, 05:46 AM
Last Post: POOJASWAMY
  No module named numpy rdx 7 59,051 Sep-24-2017, 07:12 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020