ImportError: DLL load failed while importing _tf: The specified module could not be found - dll

I am using anaconda. My version of anaconda is 2020.07 and build channel is py38_0.
I installed Universal Scene Description(USD). When I executed USD file in anaconda, I encountered the following error message. How can I fix this error?
(base) C:\Users\lastt>python C:/Users/lastt/USD/extras/usd/tutorials/helloWorld/helloWorld.py
Traceback (most recent call last):
File "C:/Users/lastt/USD/extras/usd/tutorials/helloWorld/helloWorld.py", line 26, in
from pxr import Usd, UsdGeom
File "C:\Users\lastt\Documents\usd\lib\python\pxr\Usd_init_.py", line 24, in
from pxr import Tf
File "C:\Users\lastt\Documents\usd\lib\python\pxr\Tf_init_.py", line 163, in
PreparePythonModule()
File "C:\Users\lastt\Documents\usd\lib\python\pxr\Tf_init_.py", line 88, in PreparePythonModule
module = importlib.import_module(
File "C:\Users\lastt\anaconda3\lib\importlib_init_.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: DLL load failed while importing _tf: The specified module could not be found.
USD error

Related

I installed tensorflow 2.0 but jupyter doesn't see it?

I seem to have a problem with installing tensorflow 2.0. After many attempts finally command "conda list" shows tensorflow 2.0 package successfully installed but when I try to import it in jupyter I get the error:
ImportError: Traceback (most recent call last):
File "C:\Users\giuse\anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58,
in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\giuse\anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py",
line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\giuse\anaconda3\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\giuse\anaconda3\lib\imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "C:\Users\giuse\anaconda3\lib\imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: DLL load failed: The specified module could not be found.
Can anybody help please?
If you have still below error:
ImportError: DLL load failed: The specified module could not be found.
Try to install the proper version of:
visual c++ redistributable for visual studio 2019
Or try virtual environment:
Creation of the environment
conda create -n test_env python=3.x anaconda
Activation
conda activate test_env
Deactivation
conda deactivate
Getting rid of it
conda remove -n test_env --all

Keras the specified module could not be found

I am getting this error on Keras.
ImportError: DLL load failed: The specified module could not be found while importing Keras
What I tried?
-initially "conda install -c conda-forge keras"
-then i also followed the tensorflow install instructions on tensorflow website
-I tried installing Microsoft Visual C++ that did not solve
-Also downloaded a msvcp140_1.dll file and pasted it in the sys32 and syswow64 of windows folder,did not help
-while importing the tensorflow it is reflecting the same problem
-OS-MSW-8.1
import keras
Error in callback <bound method AutoreloadMagics.post_execute_hook of <autoreload.AutoreloadMagics object at 0x0000006394266548>> (for post_execute):
Traceback (most recent call last):
File "C:\Users\admin\Anaconda3\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\admin\Anaconda3\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\admin\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, description)
File "C:\Users\admin\Anaconda3\lib\imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "C:\Users\admin\Anaconda3\lib\imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: DLL load failed: The specified module could not be found.
As confirmed in comments, the OP was missing some of the Visual Studio redistributables. After installing appropriate (in terms of architecture) vc_redist from here everything worked fine.

DLL load failed: The specified procedure could not be found. And not showing any missing DLL file name

I'm on windows 10, I'm getting this error but cant see any helpful clue to fix this. I'm trying to install tensorflow and my python version is 3.6. Can any one help me to fix this.
(venv) D:\Work\IIT\Fourth Year\Submission\FYP\FYP Project\FYPProject>python
Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
2020-02-03 08:25:40.694788: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened
dynamic library cudart64_101.dll
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "D:\Work\IIT\Fourth Year\Submission\FYP\FYP
Project\FYPProject\venv\lib\site-packages\tensorflow\__init__.py", line 101, in <module>
from tensorflow_core import *
File "D:\Work\IIT\Fourth Year\Submission\FYP\FYP
Project\FYPProject\venv\lib\site-packages\tensorflow_core\__init__.py", line 40, in <module>
from tensorflow.python.tools import module_util as _module_util
File "D:\Work\IIT\Fourth Year\Submission\FYP\FYP
Project\FYPProject\venv\lib\site-packages\tensorflow\__init__.py", line 50, in __getattr__
module = self._load()
File "D:\Work\IIT\Fourth Year\Submission\FYP\FYP
Project\FYPProject\venv\lib\site-packages\tensorflow\__init__.py", line 44, in _load
module = _importlib.import_module(self.__name__)
File "D:\Work\IIT\Fourth Year\Submission\FYP\FYP
Project\FYPProject\venv\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "D:\Work\IIT\Fourth Year\Submission\FYP\FYP Project\FYPProject\venv\lib\site-packages\tensorflow_core\python\__init__.py", line 64, in <module>
from tensorflow.core.framework.graph_pb2 import *
File "D:\Work\IIT\Fourth Year\Submission\FYP\FYP Project\FYPProject\venv\lib\site-packages\tensorflow_core\core\framework\graph_pb2.py", line 7, in <module>
from google.protobuf import descriptor as _descriptor
File "D:\Work\IIT\Fourth Year\Submission\FYP\FYP
Project\FYPProject\venv\lib\site-packages\google\protobuf\descriptor.py", line 47, in <module>
from google.protobuf.pyext import _message
ImportError: DLL load failed: The specified procedure could not be found.
>>>
So far I have found this. First uninstall the existing tensorflow using
pip uninstall tensorflow
And install again using this,
pip install tensorflow==1.5
pip install protobuf==3.6.0
if the 'tf_utils' error come you can try this,
pip install keras==2.1.5

Cannot import name 'wrap_module'

Im setting up an odoo community server and after adding and removing an addon, i am getting an error.
I have tried copying the odoo addons files back to the default install ones with no success.
Exception in thread odoo.service.cron.cron0:
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/opt/odoo/odoo/odoo/service/server.py", line 244, in target
self.cron_thread(i)
File "/opt/odoo/odoo/odoo/service/server.py", line 218, in cron_thread
from odoo.addons.base.ir.ir_cron import ir_cron
File "/opt/odoo/odoo/odoo/modules/module.py", line 82, in load_module
exec(open(modfile, 'rb').read(), new_mod.__dict__)
File "<string>", line 4, in <module>
File "/opt/odoo/odoo/odoo/addons/base/ir/__init__.py", line 8, in
<module>
from . import ir_actions
File "/opt/odoo/odoo/odoo/addons/base/ir/ir_actions.py", line 8, in
<module>
from odoo.tools import pycompat, wrap_module
ImportError: cannot import name 'wrap_module'
That is the error i am getting, ive tried using pip3 to install pycompat but it still dosnt work.
Make sure you running Odoo on python3,
on terminal python3 path_to_odoo/./odoo-bin
and clear the browser cache and try again.

Failed to load the native TensorFlow runtime ImportError: DLL load failed

I just installed tensorflow gpu v1.7 through pip. I also installed CUDA v9.0 and CUDNN v7 on a Windows 10.
My graphics card is the NVidia GTX 1060 6 GB with driver version: 22.21.13.8554
While trying to import tensorflow on Python 3.6.4, I get the following error:
Failed to load the native TensorFlow runtime
ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed
Full traceback:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Technotronics Ltd\AppData\Local\conda\conda\envs\tensorflow\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
from tensorflow.python import * # pylint: disable=redefined-builtin
File "C:\Users\Technotronics Ltd\AppData\Local\conda\conda\envs\tensorflow\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\Users\Technotronics Ltd\AppData\Local\conda\conda\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\Technotronics Ltd\AppData\Local\conda\conda\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\Technotronics Ltd\AppData\Local\conda\conda\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\Technotronics Ltd\AppData\Local\conda\conda\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 17, in swig_import_helper
return importlib.import_module(mname)
File "C:\Users\Technotronics Ltd\AppData\Local\conda\conda\envs\tensorflow\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.
Legacy & low-end CPU (without AVX) support
If your CPU didn't support AVX instructions, you will get ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed. (Win 10) or ImportError: DLL load failed with error code -1073741795 (Win 7) when using tensorflow official release 1.6.0 and up (pip install tensorflow)
You can use pip install [filename].whl which file download from sse2 folder instead of using official AVX binary.
refer:
https://github.com/fo40225/tensorflow-windows-wheel
It worked for me