title: Error while importing Tensorflow. A dynamic link library (DLL) initialization routine failed
body: <p>I am using tensorflow CPU for a while and decided to install tf gpu and now when i try to import tf it gives me this error.
  My system specs are:
  Intel Xeon w5320 2.8 Ghz 8threads.
  10 GB Ram
  Nvidia GTX 1050 2GB
  I have installed latest drivers, Cuda 9.0 and cuDNN v7.1.3 (April 17, 2018), for CUDA 9.0.
  Any kind of help is appreciated.</p>
  
  <pre><code>ImportError                               Traceback (most recent call last)
  C:\Users\Arsalan\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py in &lt;module&gt;()
       57 
  ---&gt; 58   from tensorflow.python.pywrap_tensorflow_internal import *
       59   from tensorflow.python.pywrap_tensorflow_internal import __version__
  
  C:\Users\Arsalan\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py in &lt;module&gt;()
       17         return importlib.import_module(mname)
  ---&gt; 18     _pywrap_tensorflow_internal = swig_import_helper()
       19     del swig_import_helper
  
  C:\Users\Arsalan\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py in swig_import_helper()
       16         mname = '.'.join((pkg, '_pywrap_tensorflow_internal')).lstrip('.')
  ---&gt; 17         return importlib.import_module(mname)
       18     _pywrap_tensorflow_internal = swig_import_helper()
  
  C:\Users\Arsalan\Anaconda3\lib\importlib\__init__.py in import_module(name, package)
      125             level += 1
  --&gt; 126     return _bootstrap._gcd_import(name[level:], package, level)
      127 
  
  ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed.
  
  During handling of the above exception, another exception occurred:
  
  ImportError                               Traceback (most recent call last)
  &lt;ipython-input-5-fe877e2db533&gt; in &lt;module&gt;()
  ----&gt; 1 import tensorflow as tf
        2 import numpy as np
        3 import matplotlib.pyplot as plt
  
  C:\Users\Arsalan\Anaconda3\lib\site-packages\tensorflow\__init__.py in &lt;module&gt;()
       22 
       23 # pylint: disable=wildcard-import
  ---&gt; 24 from tensorflow.python import *  # pylint: disable=redefined-builtin
       25 # pylint: enable=wildcard-import
       26 
  
  C:\Users\Arsalan\Anaconda3\lib\site-packages\tensorflow\python\__init__.py in &lt;module&gt;()
       47 import numpy as np
       48 
  ---&gt; 49 from tensorflow.python import pywrap_tensorflow
       50 
       51 # Protocol buffers
  
  C:\Users\Arsalan\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py in &lt;module&gt;()
       72 for some common reasons and solutions.  Include the entire stack trace
       73 above this error message when asking for help.""" % traceback.format_exc()
  ---&gt; 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:\Users\Arsalan\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in &lt;module&gt;
      from tensorflow.python.pywrap_tensorflow_internal import *
    File "C:\Users\Arsalan\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in &lt;module&gt;
      _pywrap_tensorflow_internal = swig_import_helper()
    File "C:\Users\Arsalan\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 17, in swig_import_helper
      return importlib.import_module(mname)
    File "C:\Users\Arsalan\Anaconda3\lib\importlib\__init__.py", line 126, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
  ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed.
  
  
  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.
  </code></pre>