<h3 dir="auto">System information</h3>
<ul dir="auto">
<li><strong>Have I written custom code (as opposed to using a stock example script provided in TensorFlow)</strong>: yes</li>
<li><strong>OS Platform and Distribution (e.g., Linux Ubuntu 16.04)</strong>: Windows 10</li>
<li><strong>Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device</strong>:</li>
<li><strong>TensorFlow installed from (source or binary)</strong>: pip 18.0 - pip install tensorflow</li>
<li><strong>TensorFlow version (use command below)</strong>: 1.9</li>
<li><strong>Python version</strong>: 3.6.3</li>
<li><strong>Bazel version (if compiling from source)</strong>:</li>
<li><strong>GCC/Compiler version (if compiling from source)</strong>:</li>
<li><strong>CUDA/cuDNN version</strong>: none</li>
<li><strong>GPU model and memory</strong>: none</li>
<li><strong>Exact command to reproduce</strong>: import tensorflow after pip install tensorflow</li>
</ul>
<h3 dir="auto">Describe the problem</h3>
<p dir="auto">I am working on a Win10 machine, with python 3.6.3 and using tensorflow 1.9, pip 18.0. I did not provide an option to install tensorflow with gpu, (i.e.), according to this</p>
<p dir="auto"><a href="https://www.tensorflow.org/install/install_windows" rel="nofollow">https://www.tensorflow.org/install/install_windows</a>,</p>
<p dir="auto">I used</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="    pip install tensorflow"><pre class="notranslate"><code class="notranslate">    pip install tensorflow
</code></pre></div>
<p dir="auto">and did not provide option for using GPU. However, when trying to import tensorflow, I am faced with the following error</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="    ModuleNotFoundError: No module named '_pywrap_tensorflow_internal'"><pre class="notranslate"><code class="notranslate">    ModuleNotFoundError: No module named '_pywrap_tensorflow_internal'
</code></pre></div>
<p dir="auto">After following various links,</p>
<p dir="auto"><a href="https://stackoverflow.com/questions/42011070/on-windows-running-import-tensorflow-generates-no-module-named-pywrap-tenso" rel="nofollow">https://stackoverflow.com/questions/42011070/on-windows-running-import-tensorflow-generates-no-module-named-pywrap-tenso</a>,<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="213984194" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/8385" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/8385/hovercard" href="https://github.com/tensorflow/tensorflow/issues/8385">#8385</a>,</p>
<p dir="auto">I installed the <strong>Visual studio update 3</strong> and also used the script provided for <strong>tensorflow self check</strong>,</p>
<p dir="auto"><a href="https://gist.github.com/mrry/ee5dbcfdd045fa48a27d56664411d41c">https://gist.github.com/mrry/ee5dbcfdd045fa48a27d56664411d41c</a>,</p>
<p dir="auto">and came across this following error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="    Could not load 'cudart64_80.dll'. .....
    Could not load 'nvcuda.dll' .......
    Could not load 'cudnn64_5.dll' ........"><pre class="notranslate"><code class="notranslate">    Could not load 'cudart64_80.dll'. .....
    Could not load 'nvcuda.dll' .......
    Could not load 'cudnn64_5.dll' ........
</code></pre></div>
<p dir="auto">Why is my Tensorflow looking for these packages, when I installed it without GPU? MY system doesn't house a GPU at the moment. I tried uninstall and reinstalling with the <strong>upgraded pip 18.0</strong>, but the issue persists. How can this be rectified.?</p>
<h3 dir="auto">Source code / logs</h3>
<hr>
<p dir="auto">Errors in Detail. in Jupyter notebook while trying import -</p>
<p dir="auto">ImportError                               Traceback (most recent call last)<br>
c:\python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py in swig_import_helper()<br>
13         try:<br>
---&gt; 14             return importlib.import_module(mname)<br>
15         except ImportError:</p>
<p dir="auto">c:\python36\lib\importlib_<em>init</em>_.py in import_module(name, package)<br>
125             level += 1<br>
--&gt; 126     return _bootstrap._gcd_import(name[level:], package, level)<br>
127</p>
<p dir="auto">c:\python36\lib\importlib_bootstrap.py in _gcd_import(name, package, level)</p>
<p dir="auto">c:\python36\lib\importlib_bootstrap.py in <em>find_and_load(name, import</em>)</p>
<p dir="auto">c:\python36\lib\importlib_bootstrap.py in <em>find_and_load_unlocked(name, import</em>)</p>
<p dir="auto">c:\python36\lib\importlib_bootstrap.py in _load_unlocked(spec)</p>
<p dir="auto">c:\python36\lib\importlib_bootstrap.py in module_from_spec(spec)</p>
<p dir="auto">c:\python36\lib\importlib_bootstrap_external.py in create_module(self, spec)</p>
<p dir="auto">c:\python36\lib\importlib_bootstrap.py in _call_with_frames_removed(f, *args, **kwds)</p>
<p dir="auto">ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed.</p>
<p dir="auto">During handling of the above exception, another exception occurred:</p>
<p dir="auto">ModuleNotFoundError                       Traceback (most recent call last)<br>
c:\python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py in ()<br>
57<br>
---&gt; 58   from tensorflow.python.pywrap_tensorflow_internal import *<br>
59   from tensorflow.python.pywrap_tensorflow_internal import <strong>version</strong></p>
<p dir="auto">c:\python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py in ()<br>
16             return importlib.import_module('_pywrap_tensorflow_internal')<br>
---&gt; 17     _pywrap_tensorflow_internal = swig_import_helper()<br>
18     del swig_import_helper</p>
<p dir="auto">c:\python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py in swig_import_helper()<br>
15         except ImportError:<br>
---&gt; 16             return importlib.import_module('_pywrap_tensorflow_internal')<br>
17     _pywrap_tensorflow_internal = swig_import_helper()</p>
<p dir="auto">c:\python36\lib\importlib_<em>init</em>_.py in import_module(name, package)<br>
125             level += 1<br>
--&gt; 126     return _bootstrap._gcd_import(name[level:], package, level)<br>
127</p>
<p dir="auto">ModuleNotFoundError: No module named '_pywrap_tensorflow_internal'</p>
<p dir="auto">During handling of the above exception, another exception occurred:</p>
<p dir="auto">ImportError                               Traceback (most recent call last)<br>
 in ()<br>
1 get_ipython().run_line_magic('pylab', 'inline')<br>
----&gt; 2 from keras import regularizers, activations<br>
3 from keras.models import Sequential, load_model<br>
4 from keras.utils import np_utils,plot_model,to_categorical<br>
5 import pandas</p>
<p dir="auto">c:\python36\lib\site-packages\keras_<em>init</em>_.py in ()<br>
1 from <strong>future</strong> import absolute_import<br>
2<br>
----&gt; 3 from . import utils<br>
4 from . import activations<br>
5 from . import applications</p>
<p dir="auto">c:\python36\lib\site-packages\keras\utils_<em>init</em>_.py in ()<br>
4 from . import data_utils<br>
5 from . import io_utils<br>
----&gt; 6 from . import conv_utils<br>
7<br>
8 # Globally-importable utils.</p>
<p dir="auto">c:\python36\lib\site-packages\keras\utils\conv_utils.py in ()<br>
7 from six.moves import range<br>
8 import numpy as np<br>
----&gt; 9 from .. import backend as K<br>
10<br>
11</p>
<p dir="auto">c:\python36\lib\site-packages\keras\backend_<em>init</em>_.py in ()<br>
87 elif _BACKEND == 'tensorflow':<br>
88     sys.stderr.write('Using TensorFlow backend.\n')<br>
---&gt; 89     from .tensorflow_backend import *<br>
90 else:<br>
91     # Try and load external backend.</p>
<p dir="auto">c:\python36\lib\site-packages\keras\backend\tensorflow_backend.py in ()<br>
3 from <strong>future</strong> import print_function<br>
4<br>
----&gt; 5 import tensorflow as tf<br>
6 from tensorflow.python.framework import ops as tf_ops<br>
7 from tensorflow.python.training import moving_averages</p>
<p dir="auto">c:\python36\lib\site-packages\tensorflow_<em>init</em>_.py in ()<br>
20<br>
21 # pylint: disable=g-bad-import-order<br>
---&gt; 22 from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import<br>
23 from . import app<br>
24 from . import bitwise</p>
<p dir="auto">c:\python36\lib\site-packages\tensorflow\python_<em>init</em>_.py in ()<br>
47 import numpy as np<br>
48<br>
---&gt; 49 from tensorflow.python import pywrap_tensorflow<br>
50<br>
51 # Protocol buffers</p>
<p dir="auto">c:\python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py in ()<br>
72 for some common reasons and solutions.  Include the entire stack trace<br>
73 above this error message when asking for help.""" % traceback.format_exc()<br>
---&gt; 74   raise ImportError(msg)<br>
75<br>
76 # pylint: enable=wildcard-import,g-import-not-at-top,unused-import,line-too-long</p>
<p dir="auto">ImportError: Traceback (most recent call last):<br>
File "c:\python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 14, in swig_import_helper<br>
return importlib.import_module(mname)<br>
File "c:\python36\lib\importlib_<em>init</em>_.py", line 126, in import_module<br>
return _bootstrap._gcd_import(name[level:], package, level)<br>
File "", line 994, in _gcd_import<br>
File "", line 971, in _find_and_load<br>
File "", line 955, in _find_and_load_unlocked<br>
File "", line 658, in _load_unlocked<br>
File "", line 571, in module_from_spec<br>
File "", line 922, in create_module<br>
File "", line 219, in _call_with_frames_removed<br>
ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed.</p>
<p dir="auto">During handling of the above exception, another exception occurred:</p>
<p dir="auto">Traceback (most recent call last):<br>
File "c:\python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <br>
from tensorflow.python.pywrap_tensorflow_internal import *<br>
File "c:\python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 17, in <br>
_pywrap_tensorflow_internal = swig_import_helper()<br>
File "c:\python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 16, in swig_import_helper<br>
return importlib.import_module('<em>pywrap_tensorflow_internal')<br>
File "c:\python36\lib\importlib_<em>init</em></em>.py", line 126, in import_module<br>
return _bootstrap._gcd_import(name[level:], package, level)<br>
ModuleNotFoundError: No module named '_pywrap_tensorflow_internal'</p>
<p dir="auto">Failed to load the native TensorFlow runtime.</p>
<p dir="auto">See <a href="https://www.tensorflow.org/install/install_sources#common_installation_problems" rel="nofollow">https://www.tensorflow.org/install/install_sources#common_installation_problems</a></p>
<p dir="auto">for some common reasons and solutions.  Include the entire stack trace<br>
above this error message when asking for help.</p>
<hr>
<p dir="auto">Tensorflow Self Check output</p>
<p dir="auto">ERROR: Failed to import the TensorFlow module.</p>
<h1 dir="auto">WARNING! This script is no longer maintained!</h1>
<p dir="auto">Since TensorFlow 1.4, the self-check has been integrated with TensorFlow itself,<br>
and any missing DLLs will be reported when you execute the <code class="notranslate">import tensorflow</code><br>
statement. The error messages printed below refer to TensorFlow 1.3 and earlier,<br>
and are inaccurate for later versions of TensorFlow.</p>
<ul dir="auto">
<li>
<p dir="auto">Python version is 3.6.</p>
</li>
<li>
<p dir="auto">TensorFlow is installed at: C:\Python36\lib\site-packages\tensorflow</p>
</li>
<li>
<p dir="auto">Could not load 'cudart64_80.dll'. The GPU version of TensorFlow<br>
requires that this DLL be installed in a directory that is named in<br>
your %PATH% environment variable. Download and install CUDA 8.0 from<br>
this URL: <a href="https://developer.nvidia.com/cuda-toolkit" rel="nofollow">https://developer.nvidia.com/cuda-toolkit</a></p>
</li>
<li>
<p dir="auto">Could not load 'nvcuda.dll'. The GPU version of TensorFlow requires that<br>
this DLL be installed in a directory that is named in your %PATH%<br>
environment variable. Typically it is installed in 'C:\Windows\System32'.<br>
If it is not present, ensure that you have a CUDA-capable GPU with the<br>
correct driver installed.</p>
</li>
<li>
<p dir="auto">Could not load 'cudnn64_5.dll'. The GPU version of TensorFlow<br>
requires that this DLL be installed in a directory that is named in<br>
your %PATH% environment variable. Note that installing cuDNN is a<br>
separate step from installing CUDA, and it is often found in a<br>
different directory from the CUDA DLLs. You may install the<br>
necessary DLL by downloading cuDNN 5.1 from this URL:<br>
<a href="https://developer.nvidia.com/cudnn" rel="nofollow">https://developer.nvidia.com/cudnn</a></p>
</li>
<li>
<p dir="auto">Could not find cuDNN.</p>
</li>
</ul>
<hr>
<p dir="auto">As announced in release notes, TensorFlow release binaries version 1.6 and higher are prebuilt with AVX instruction sets. This means on any CPU that do not have these instruction sets either CPU or GPU version of TF will fail to load with any of the following errors:</p>
<ul dir="auto">
<li><code class="notranslate">ImportError: DLL load failed:</code></li>
<li>A crash with return code 132</li>
</ul>
<p dir="auto">Our recommendation is to build TF from sources on these systems.</p>
<h3 dir="auto">System information</h3>
<ul dir="auto">
<li><strong>Have I written custom code (as opposed to using a stock example script provided in TensorFlow)</strong>: No</li>
<li><strong>OS Platform and Distribution (e.g., Linux Ubuntu 16.04)</strong>: ubuntu/windows/macos</li>
<li><strong>TensorFlow installed from (source or binary)</strong>: binary</li>
<li><strong>TensorFlow version (use command below)</strong>: 1.6 and up</li>
<li><strong>Python version</strong>:  2.7, 3.3, 3.4, 3.5, 3.6 and any newer</li>
<li><strong>Bazel version (if compiling from source)</strong>: n/a</li>
<li><strong>GCC/Compiler version (if compiling from source)</strong>: n/a</li>
<li><strong>CUDA/cuDNN version</strong>: any</li>
<li><strong>GPU model and memory</strong>: any</li>
<li><strong>Exact command to reproduce</strong>: python -c "import tensorflow as tf"</li>
</ul>