Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed. #42947

Closed
HiImAri opened this issue Sep 4, 2020 · 7 comments
Assignees
Labels
stale This label marks the issue/pr stale - to be closed automatically if no activity stat:awaiting response Status - Awaiting response from author subtype:windows Windows Build/Installation Issues type:build/install Build and install issues

Comments

@HiImAri
Copy link

HiImAri commented Sep 4, 2020

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10 64 bit
  • Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: Surface Pro
  • TensorFlow installed from (source or binary):
  • TensorFlow version:2
  • Python version:3.7.9
  • Installed using virtualenv? pip? conda?:PIP

Can't import

import tensorflow as tf
Traceback (most recent call last):
File "C:\Users\rache\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\pywrap_tensorflow.py", line 64, in
from tensorflow.python._pywrap_tensorflow_internal import *
ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 1, in
File "C:\Users\rache\AppData\Roaming\Python\Python37\site-packages\tensorflow_init_.py", line 41, in
from tensorflow.python.tools import module_util as module_util
File "C:\Users\rache\AppData\Roaming\Python\Python37\site-packages\tensorflow\python_init
.py", line 40, in
from tensorflow.python.eager import context
File "C:\Users\rache\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\eager\context.py", line 35, in
from tensorflow.python import pywrap_tfe
File "C:\Users\rache\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\pywrap_tfe.py", line 28, in
from tensorflow.python import pywrap_tensorflow
File "C:\Users\rache\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\pywrap_tensorflow.py", line 83, in
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\rache\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\pywrap_tensorflow.py", line 64, in
from tensorflow.python._pywrap_tensorflow_internal import *
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/errors

for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.

@HiImAri HiImAri added the type:build/install Build and install issues label Sep 4, 2020
@ravikyram ravikyram added the subtype:windows Windows Build/Installation Issues label Sep 4, 2020
@ravikyram
Copy link
Contributor

@HiImAri

What is make/model of your cpu?
I suspect your cpu model does not support AVX instructions sets.See hardware requirements
Make sure to download the latest microsoft visual c++ redistributable from here.
.Also, please follow the instructions from to install from Tensorflow website.

Please, check Your CPU/Python is on 32 bits?Please, refer #42751 and see if it helps you.Please, refer similar issues #36167 #36151 #36138 #36054 #36045 #36020 #36003 #35988 #35903 #35880 #35865 #35805 #35789 #35773 #35772 #35767 #35766 #35749 #35721 #35618 #35204
Thanks!

@ravikyram ravikyram added the stat:awaiting response Status - Awaiting response from author label Sep 4, 2020
@HiImAri
Copy link
Author

HiImAri commented Sep 4, 2020

Running on 64 bits and im running Intel(R) Atom(TM) x7-Z8700 CPU@160GHz and i already downloaded the Microsoft visual c++ while following the instructions through Tensorflow website

@ravikyram
Copy link
Contributor

@HiImAri

Looking at specification of your cpu seems like avx is not supported.Please, refer the link here.
In this case you can build Tensorflow from source or use Google colab as an alternative. Thanks!

@akashAD98
Copy link

akashAD98 commented Sep 4, 2020

I faced the same issue with tensorflow what i did was :

`Install anaconda

open anaconda prompt

conda create -n tf20 python=3.6

activate tf20

conda install tensorflow or pip install tensorflow==2.0.0

Now check by importing tensorflow
the version i used was 3.6, but you can also try with 3.7 Hope it helps!

@tensorflowbutler tensorflowbutler removed the stat:awaiting response Status - Awaiting response from author label Sep 6, 2020
@ravikyram ravikyram added the stat:awaiting response Status - Awaiting response from author label Sep 7, 2020
@google-ml-butler
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you.

@google-ml-butler google-ml-butler bot added the stale This label marks the issue/pr stale - to be closed automatically if no activity label Sep 14, 2020
@google-ml-butler
Copy link

Closing as stale. Please reopen if you'd like to work on this further.

@google-ml-butler
Copy link

Are you satisfied with the resolution of your issue?
Yes
No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale This label marks the issue/pr stale - to be closed automatically if no activity stat:awaiting response Status - Awaiting response from author subtype:windows Windows Build/Installation Issues type:build/install Build and install issues
Projects
None yet
Development

No branches or pull requests

4 participants