Explore Courses Blog Tutorials Interview Questions
0 votes
in Data Science by (18.4k points)

I have installed the Tensorflow version 2.2.0 in windows, but it gives error as follows:


ImportError                               Traceback (most recent call last)

G:\anaconda\lib\site-packages\tensorflow\python\ in <module>


---> 58   from tensorflow.python.pywrap_tensorflow_internal import *


G:\anaconda\lib\site-packages\tensorflow\python\ in <module>

     27             return _mod

---> 28     _pywrap_tensorflow_internal = swig_import_helper()

     29     del swig_import_helper

G:\anaconda\lib\site-packages\tensorflow\python\ in swig_import_helper()

     23             try:

---> 24                 _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)

     25             finally:

G:\anaconda\lib\ in load_module(name, file, filename, details)

    241         else:

--> 242             return load_dynamic(name, filename, file)

    243     elif type_ == PKG_DIRECTORY:

G:\anaconda\lib\ in load_dynamic(name, path, file)

    341             name=name, loader=loader, origin=path)

--> 342         return _load(spec)


ImportError: DLL load failed: The specified module could not be found.

During handling of the above exception, another exception occurred:

ImportError                               Traceback (most recent call last)

<ipython-input-15-5e7c1303e954> in <module>

----> 1 import tensorflow


      3 train_examples = tf.keras.utils.normalize(new_train, axis=1)


      5 test_examples = tf.keras.utils.normalize(new_test, axis=1)

G:\anaconda\lib\site-packages\tensorflow\ in <module>

     39 import sys as _sys


---> 41 from import module_util as _module_util

     42 from tensorflow.python.util.lazy_loader import LazyLoader as _LazyLoader


G:\anaconda\lib\site-packages\tensorflow\python\ in <module>

     48 import numpy as np


---> 50 from tensorflow.python import pywrap_tensorflow


     52 # Protocol buffers

G:\anaconda\lib\site-packages\tensorflow\python\ in <module>

     67 for some common reasons and solutions.  Include the entire stack trace

     68 above this error message when asking for help.""" % traceback.format_exc()

---> 69   raise ImportError(msg)


     71 # pylint: enable=wildcard-import,g-import-not-at-top,unused-import,line-too-long

ImportError: Traceback (most recent call last):

  File "G:\anaconda\lib\site-packages\tensorflow\python\", line 58, in <module>

    from tensorflow.python.pywrap_tensorflow_internal import *

  File "G:\anaconda\lib\site-packages\tensorflow\python\", line 28, in <module>

    _pywrap_tensorflow_internal = swig_import_helper()

  File "G:\anaconda\lib\site-packages\tensorflow\python\", line 24, in swig_import_helper

    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)

  File "G:\anaconda\lib\", line 242, in load_module

    return load_dynamic(name, filename, file)

  File "G:\anaconda\lib\", line 342, in load_dynamic

    return _load(spec)

ImportError: DLL load failed: The specified module could not be found.

1 Answer

0 votes
by (36.8k points)
  1. download x64: vc_redist.x64.exe
  2. install it.

Another solution is downgrading to tensorflow 2.0 

pip install tensorflow==2.0

If you want to know more about the Data Science then do check out the following Data Science which will help you in understanding Data Science from scratch


Welcome to Intellipaat Community. Get your technical queries answered by top developers!

30.5k questions

32.6k answers


108k users

Browse Categories