Reputation: 47
I am setting up a Captcha solver with tensorflow object-detection and i get this error
DLL load failed: A dynamic link library (DLL) initialization routine failed.
It is on a Windows Server I got Python 3.7.3 And Tensorflow 1.14.0 and i am not using the tensorflow-gpu ! but i already get this error
import tensorflow as tf
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed.
Failed to load the native TensorFlow runtime.
I did Everything And Installed All Of required libraries.
i saw all other questions with this theme in stackoverflow but all of them was solving for tensorflow-gpu.
Upvotes: 2
Views: 1760
Reputation: 853
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.
Apparently, your CPU model does not support AVX instruction sets. 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 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.
Upvotes: 3