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

dll load failed with errorcode 3221225501 #35598

Closed
ghost opened this issue Jan 6, 2020 · 18 comments
Closed

dll load failed with errorcode 3221225501 #35598

ghost opened this issue Jan 6, 2020 · 18 comments
Assignees
Labels
subtype:windows Windows Build/Installation Issues TF 2.0 Issues relating to TensorFlow 2.0 type:build/install Build and install issues

Comments

@ghost
Copy link

ghost commented Jan 6, 2020

Please make sure that this is a build/installation issue. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 7
  • TensorFlow installed from (source or binary): pip install tensorflow
  • TensorFlow version: 2.0
  • Python version: 3.7.4
  • Installed using virtualenv? pip? conda?: installed using pip also tried wheel
  • GCC/Compiler version (if compiling from source):
  • CUDA/cuDNN version:
  • GPU model and memory: No Gpu, only cpu,

Describe the problem
When i import tensorflow it raise error
dll load failed with errorcode 3221225501
I tried several methods like

  1. Installing whl from Tensorflow wheel
  2. Installed visual c++ 2015 redistributable

But all failed,

Provide the exact sequence of commands / steps that you executed before running into the problem

import tensorflow

Any other info / logs

import tensorflow
Traceback (most recent call last):
File "C:\Users\SAMAN\Anaconda3\lib\site-packages\tensorflow_core\python\pywrap
_tensorflow.py", line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\SAMAN\Anaconda3\lib\site-packages\tensorflow_core\python\pywrap
_tensorflow_internal.py", line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\SAMAN\Anaconda3\lib\site-packages\tensorflow_core\python\pywrap
_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, descript
ion)
File "C:\Users\SAMAN\Anaconda3\lib\imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "C:\Users\SAMAN\Anaconda3\lib\imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: DLL load failed with error code 3221225501

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 1, in
File "C:\Users\SAMAN\Anaconda3\lib\site-packages\tensorflow_init_.py", line
98, in
from tensorflow_core import *
File "C:\Users\SAMAN\Anaconda3\lib\site-packages\tensorflow_core_init_.py",
line 42, in
from . api.v2 import audio
File "C:\Users\SAMAN\Anaconda3\lib\site-packages\tensorflow_core_api\v2\audio
_init
.py", line 10, in
from tensorflow.python.ops.gen_audio_ops import decode_wav
File "C:\Users\SAMAN\Anaconda3\lib\site-packages\tensorflow_core\python\ops\ge
n_audio_ops.py", line 9, in
from tensorflow.python import pywrap_tensorflow as pywrap_tensorflow
File "C:\Users\SAMAN\Anaconda3\lib\site-packages\tensorflow_init
.py", line
50, in getattr
module = self.load()
File "C:\Users\SAMAN\Anaconda3\lib\site-packages\tensorflow_init
.py", line
44, in _load
module = importlib.import_module(self.name)
File "C:\Users\SAMAN\Anaconda3\lib\importlib_init
.py", line 127, in import
_module
return _bootstrap._gcd_import(name[level:], package, level)
File "C:\Users\SAMAN\Anaconda3\lib\site-packages\tensorflow_core\python__init
__.py", line 49, in
from tensorflow.python import pywrap_tensorflow
File "C:\Users\SAMAN\Anaconda3\lib\site-packages\tensorflow_core\python\pywrap
_tensorflow.py", line 74, in
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\SAMAN\Anaconda3\lib\site-packages\tensorflow_core\python\pywrap
_tensorflow.py", line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\SAMAN\Anaconda3\lib\site-packages\tensorflow_core\python\pywrap
_tensorflow_internal.py", line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\SAMAN\Anaconda3\lib\site-packages\tensorflow_core\python\pywrap
_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, descript
ion)
File "C:\Users\SAMAN\Anaconda3\lib\imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "C:\Users\SAMAN\Anaconda3\lib\imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: DLL load failed with error code 3221225501

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.

@ravikyram ravikyram self-assigned this Jan 6, 2020
@ravikyram ravikyram added TF 2.0 Issues relating to TensorFlow 2.0 type:build/install Build and install issues labels Jan 6, 2020
@ravikyram
Copy link
Contributor

@razzOn2calculus

Can you please refer the link1 and link2 .Thanks!

@ravikyram ravikyram added the stat:awaiting response Status - Awaiting response from author label Jan 7, 2020
@ghost
Copy link
Author

ghost commented Jan 8, 2020

It didnt solved the problem.

@tensorflowbutler tensorflowbutler removed the stat:awaiting response Status - Awaiting response from author label Jan 9, 2020
@ravikyram ravikyram added the subtype:windows Windows Build/Installation Issues label Jan 9, 2020
@ravikyram ravikyram assigned ymodak and unassigned ravikyram Jan 9, 2020
@ymodak
Copy link
Contributor

ymodak commented Jan 9, 2020

What is make/model of your cpu?
I suspect your cpu model does not support AVX instructions sets.
See hardware requirements

@ymodak ymodak added the stat:awaiting response Status - Awaiting response from author label Jan 9, 2020
@ghost
Copy link
Author

ghost commented Jan 10, 2020

@ymodak Here are specification of my system,

System model: Inspiron N4030
System Type: x64-based pc
processor: Intel(R) Core(TM) i3 CPU M 380

@tensorflowbutler tensorflowbutler removed the stat:awaiting response Status - Awaiting response from author label Jan 10, 2020
@ymodak
Copy link
Contributor

ymodak commented Jan 10, 2020

Your cpu does not support avx instruction sets. See https://ark.intel.com/content/www/us/en/ark/products/50178/intel-core-i3-380m-processor-3m-cache-2-53-ghz.html

TensorFlow release binaries version 1.6 and higher are prebuilt with AVX instruction sets.

Therefore on any CPU that does not have these instruction sets, either CPU or GPU version of TF will fail to load.
You can still use TensorFlow with the alternatives given below:

  • Try Google Colab to use TensorFlow.
    • The easiest way to use TF will be to switch to google colab. You get pre-installed latest stable TF version. Also you can use pip install to install any other preferred TF version.
    • It has an added advantage since you can you easily switch to different hardware accelerators
      (cpu, gpu, tpu) as per the task.
    • All you need is a good internet connection and you are all set.
  • Try to build TF from sources by changing CPU optimization flags.

@ymodak ymodak closed this as completed Jan 10, 2020
@tensorflow-bot
Copy link

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

@ghost
Copy link
Author

ghost commented Jan 11, 2020

Thanks for response @ymodak . But , before tensorflow was working fine in my machine, i got this problem recently. week passed , I didnt find the solution.

@ymodak
Copy link
Contributor

ymodak commented Jan 12, 2020

@razzOn2calculus What version were you using before? I suspect it was TF 1.5 or less.

@ghost
Copy link
Author

ghost commented Jan 12, 2020

I think it was 2.0.0 but recently now it is 2.1.. .
I downgraded to the old version available 1.13.2 but it is also not working.

@ghost
Copy link
Author

ghost commented Jan 17, 2020

After 10 days, Problem solved after downgrading to
tensorflow version <= 1.6.0

Since as
https://en.wikipedia.org/wiki/Advanced_Vector_Extensions#cite_note-36
Avx instruction as added after tensorflow version 1.6.0 .

I downloaded older package-lists of anaconda
and installed . Thanks guys.

@textyash20
Copy link

i am getting same issue can you help me with that also

@MasoumehVahedi
Copy link

I have the same problem. Could you help me how can I tackle this issue?

@textyash20
Copy link

textyash20 commented Jun 24, 2020 via email

@textyash20
Copy link

textyash20 commented Jun 24, 2020 via email

@textyash20
Copy link

textyash20 commented Jun 24, 2020 via email

@textyash20
Copy link

textyash20 commented Jun 24, 2020 via email

@saiabinesh
Copy link

https://github.com/fo40225/tensorflow-windows-wheel/blob/master/1.14.0/py37/CPU/sse2/tensorflow-1.14.0-cp37-cp37m-win_amd64.whl

On Wed, Jun 24, 2020 at 8:55 PM Yash Kadam @.> wrote: yes text me at insta my id @yash_kadam On Wed, Jun 24, 2020, 8:49 PM MasoumehVahedi @.> wrote: > I have the same problem. Could you help me how can I tackle this issue? > > — > You are receiving this because you commented. > Reply to this email directly, view it on GitHub > <#35598 (comment)>, > or unsubscribe > https://github.com/notifications/unsubscribe-auth/APGAJM4SRLVY3MHWEI3PSYLRYIKQ5ANCNFSM4KC7CDHQ > . >

You are a life saver!
Installed tf 1.15 from official pypi for windows 7.

Didn't work, even though it was supposedly not AVX enabled.

Yours worked. Thank you!

@textyash20
Copy link

textyash20 commented Dec 30, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
subtype:windows Windows Build/Installation Issues TF 2.0 Issues relating to TensorFlow 2.0 type:build/install Build and install issues
Projects
None yet
Development

No branches or pull requests

6 participants