• Register
0 votes

Problem :

Recently I have installed the tensorflow with a gpu support also with cuda toolkit v9.0 and cuDNNv7.1 and python 3.6 in the conda enviroment.

When I tried below command it is giving me following error

import tensorflow as tf
Traceback (most recent call last):
      File "C:\Users\mphil\AppData\Local\conda\conda\envs\tensorflow_gpu\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
        from tensorflow.python.pywrap_tensorflow_internal import *
      File "C:\Users\mphil\AppData\Local\conda\conda\envs\tensorflow_gpu\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in <module>
        _pywrap_tensorflow_internal = swig_import_helper()
      File "C:\Users\mphil\AppData\Local\conda\conda\envs\tensorflow_gpu\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 17, in swig_import_helper
        return importlib.import_module(mname)
      File "C:\Users\mphil\AppData\Local\conda\conda\envs\tensorflow_gpu\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.


8 4 2
2,300 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

I have gone through your problem, I had faced same problem recently and I was able to fix this by following below procedure:

The very first step which I did was to download the Miniconda from the following link https://docs.conda.io/en/latest/miniconda.html

After that I had installed the Miniconda and also tick the 'Add to Path' option.

I opened the Anaconda command prompt or the power shell and just typed 'conda' to make sure it is correctly installed

Then I typed following command 'conda activate base' to activate my base environment you can see base in front of the directory

Now I was ready to install the tensorflow so I typed 'conda install tensorflow' and waited for some time it installed tensorflow 2.0 and all of the dependencies

Then I did import tensorflow

And it started working for me!!!

5 2 1
4,980 points

Related questions

0 votes
1 answer 4 views
Problem I don&rsquo;t understand this, need help to solve this problem, "importerror: dll load failed with error code -1073741795."
asked Apr 7 salim1 60.6k points
0 votes
1 answer 7 views
Problem: What are my options for dealing with this issue &ldquo;The procedure entry point could not be located in the dynamic link library kernel32.dll win 7&rdquo;?
asked Apr 5 tuhin1 48.9k points
0 votes
1 answer 6 views
Problem: i have an issue that i am unable to load dynamic link library please sovle my issue.
asked Mar 22 waseem memon 2.4k points
0 votes
1 answer 39 views
Problem : error: Failed to load the native TensorFlow runtime
asked Feb 25 Sabbir Hossain 14.6k points
0 votes
1 answer 3 views
Problem: I've been beginning to work with images in Python and I wanted to start using PIL (Pillow). To install it, I ran pip install Pillow. When installing, PIL was not previously installed. I also tried uninstalling it and reinstalling it, as well as using pip3 install Pillow.Why is this happening if the needed DLL is there? How can I fix it?
asked May 1 Moumita Bhowmick 12.9k points
1 vote
1 answer 4 views
Problem: I have installed everything required &ndash; Python 2.5.4, Numpy 1.5.0 win32, Matplotlib 1.0.0 win32, pywin32 218 . But I&rsquo;m still getting error whenever I try to plot graphs in python . import pylab File "C:\Python25\lib\site-packages\ ... _path import affine_transform ImportError: DLL load failed: The specified module could not be found.What is the problem and how can I solve it ?
asked Apr 29 Raj Tyagi 14.9k points
0 votes
1 answer 4 views
Problem: I tried to install tensorflow cpu using pip in my windows8.1 64bit python3.6.0 using pip install tensorflow but it gives me this error: Traceback (most recent call last): File "C:\Users\Laitooo San\Desktop\tf.py", line 1, in <module> ... .dll is there and install Microsoft visual c++ 2015 I also uninstalled tensorflow and installed another version several times but without any result.
asked Apr 26 Moumita Bhowmick 12.9k points
0 votes
1 answer 3 views
Problem: I'm using Anaconda 3.1.0 on Windows 7 64 bit. I have installed tensorflow(GPU). I am getting errors while running following command. >>> import tensorflow as tf The complete traceback (tensorflow) C:\windows\system32>python ... /install_sources#common_installation_probl ems for some common reasons and solutions. Include the entire stack trace above this error message when asking for help.
asked Apr 26 Moumita Bhowmick 12.9k points
0 votes
1 answer 9 views
Problem: I'm learning python using Visual Studio 2017 on Windows 10. When I'm trying to import NumPy library into my code, this error appears. I have tried uninstalling and reinstalling, looking for libiomp5md.dll per instruction in ImportError: DLL load ... not under version control). Otherwise reinstall numpy. Original error was: DLL load failed: The specified procedure could not be found.
asked Apr 24 Humaira ahmed 50.7k points
0 votes
1 answer 14 views
Problem: Hi, I am trying to run the example code from the install Kivy. The following is the error I receive back. Any help would be great: Sdl2 - importerror: dll load failed: the specified module could not be found. Any help appreciated.
asked Mar 27 ummesalma 29.2k points