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
Win10: ImportError: DLL load failed: The specified module could not be found #22794
Comments
Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks. |
Ok done. |
I had the same issue while trying to use tensorflow-gpu on windows 10.
you can also check the fullpost on https://www.pugetsystems.com/labs/hpc/The-Best-Way-to-Install-TensorFlow-with-GPU-Support-on-Windows-10-Without-Installing-CUDA-1187/ Credit to Dr Donald Kinghorn |
I have same problem with you @damcclane . How did you solve ? Win10 x64, python 3.6, cuda9 with cudnn 7.0.5 and also Win10 x64, python 3.7, cuda10 with cudnn 7.3.1 Both has the same problem. My graphic card is Nvidia GeForce 1050 Ti |
Same issue. Win10 x64, python 3.5, tensorflow-gpu 1.11.0, CUDA 8 with CUDNN 6 installed. |
Same problem,Win10 x64,python 3.6 ,cuda 9 with cudnn 7.0 |
Same problem, anyone knows how to solve this? |
Same problem here… :( |
I've had this issue in the past and it was because I had the wrong version of CUDNN. You could try downloading a few of them and see if any of those work. |
I would like to encourage all who are facing this issue to create a new issue on TensorFlow repo so that we can focus on solving your problem on individual basis since the system config can vary from person to person. Thanks! |
Fixed, Thenks!
…On Wed, Oct 17, 2018 at 10:39 AM Corentin Jemine ***@***.***> wrote:
I've had this issue in the past and it was because I had the wrong version
of CUDNN. You could try downloading a few of them and see if any of those
work.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#22794 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYfA4TRxTaZ7pKfyszlWqPGknt_ohvlaks5ul082gaJpZM4XLOd->
.
|
I installed CUDA9 and cuDNN 7.0.5 again and restarted the computer. The related problem has just gone. |
I am using Cuda10 and cudaNN 7.3.1.20 and i got the following error can someone tell the solution @tensorflowbutler During handling of the above exception, another exception occurred: Traceback (most recent call last): Failed to load the native TensorFlow runtime. |
Same issue, Windows 10 x64, python3.5, tensorflow-gpu 1.11.0, CUDA 10.0, cudnn 7.3.1, my graphics card is GTX 1070Ti |
|
Same problem, on cuda 10, when I install anaconda I have missed the PyHamcrest, after I install "pip install PyHamcrest" all worked fine until today. I get the same error. |
I am facing the same issues. The problem appears also in importing another package named PyQSTEM for electron microscopy simulation. If someone can find a way to fix the problem, could please share here the solution? Thanks |
Same issue, and I tried to install CUDA 9.0, but NVIDIA inform me the driver is not compatible graphic hardware, but with CUDA 10.0, there is no such warning. |
Lucky, Issue solved when getting visual studio 2017 with C++ package installed, Windows 10 x64, python3.6.7, tensorflow-gpu 1.11.0, cudnn 7.3.1, both cuda 9.0 & cuda 10.0 installed(not checking which is the right one), my graphics card is GTX 1070Ti. |
I finally solve the problem by installing cuda 9.0 instead of 9.2 or 10.0 with tensorflow 1.12.0 and cudnn 7.4.1.5 |
I can confirm, that the following assembly does not work on Windows 10:
Additional infos:
I also get the message
Unfortunately, it does not say which module is missed. [EDIT] Just realized, that you write:
I'll reinstall now. |
Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): |
My install: Windows 10.0.17763.134 x64 The cause of this error seems to be people installing Python without Tcl/Tk support not realizing that Tcl is necessary for SWIG and module imports. I just tested this and in my case it was not enough to modify the Python installation to add Tcl/Tk -- I had to delete everything and install from scratch and now I am not getting the error anymore. TL;DR -- just fully remove and reinstall Python with Tcl/Tk option selected. |
After spending almost two days, I finally solved the problem by installing:
Thanks to @WuYunfan 💯 |
Had this issue with Tensorflow 2.1.0 (CPU version). Managed to fix it by downgrading to Tensorflow 2.0.0:
|
If you are having this after 2.1.0, it is probably because it comes with GPU support by default. And it requires Microsoft Visual C++ Redistributable for Visual Studio 2015 as shown in the installation step #1 on the website. From the release notes: |
I found the release notes that @abdulrahman-khankan screenshot'd above: https://github.com/tensorflow/tensorflow/releases/tag/v2.1.0 Here is the Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019 link from that document. Remember, text in screenshots can't be clicked, copied, translated, read by screen readers, etc.! |
I assumed everyone knows how to go to the releases page or just google the MS installers. Thanks for sharing the links! |
Because of further issues with PyInstaller I ended up downgrading to |
@ERDataDoc using your link
is helpful but sometimes it can upgrade the driver to CUDA 10.2 which is not supported yet |
Sorry I realize this isn't helpful but I've now given up trying to do anything serious with Python under Windows. 3 Weeks in and I'm still trying to install all the shit I need for the first tutorial (Maybe I set my sights too high but then I do remember punch cards and paper tape) |
#22512 (comment) |
I installed the redistributable and msvcp140.dll is available on my file system. However, I still get the error. Downgrading helps, but I need to upgrade my version, since there is an unfixed bug on 2.0.0 I can't get around. Is there any notice from the developers, that they are working on this? |
I fixed it. Installed tensorflow with pip install tensorflow-cpu issue was because i didn't had nvidia graphics so that i should install with cpu version because i am using Raedon vega 8 graphics Hope it helps. |
In my case, I was using Python 3.6 and it was erroring. So I upgraded to 3.6.8 and it then worked with tensorflow 2.0.0 |
It's work for me python: 3.7.6 |
I installed
|
This is the final answer on this thread: #22794 (comment) Please don't spam with "I solved it!" and custom solutions. |
Hi, @mihaimaruseac
If some one need tensorflow whl without AVX support you can find it in this repository, many thanks to the author. Or you can use Intel Software Development Emulator to run original tensorflow with AVX support. To test AVX support use Coreinfo. |
ERROR:root:Internal Python error in the inspect module. Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): 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 |
please uninstall the latest Microsoft Visual C++ Redistributable for Visual Studio version if you install 2019 and before that download Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019 depending on your system either x64 or x86 on this website https://support.microsoft.com/en-my/help/2977003/the-latest-supported-visual-c-downloads |
Hi fitrialif, |
Seems to be a problem with TF2.1. Downgrading to TF2.0 worked for me: pip install tensorflow==2.0 |
@pallyndr this is because you need to download the newest MSVC redistributable for 2.1 as mentioned in #22794 (comment) Unfortunately as people keep piling on the thread with "it works for me"/"I'm having the same issue"/"solved it by doing this other thing", the actual solution in the above comment got burried. |
after I download MSVC and CUDA (I am with NVIDIA card) and cuDNN it worked. |
Locking conversation to not get more comments that mute the solution |
System information:
Have I written custom code: No
OS Platform and Distribution: Windows 10 Pro updated
Mobile device: None
TensorFlow installed from: pip install
TensorFlow version: 1.11.0
Python Version: 3.6.6
Bazel version: not installed
CUDA/cuDNN version: CUDA 9.0, cuDNN 8.0
GPU model and memory: GF-GTX970 STRIX
Exact command to reproduce:
pip install tensorflow
pip install tensorflow-gpu
python
import tensorflow as tf
Problem
I have had this error consistently even after trying to downgrade to older versions of CUDA tool, cuDNN, python, tensorflow and tensorflow-gpu. I have updated my enviornment variables. I have installed Visual C++ Redistributable Update.
I have read and tried to follow the solutions from other similar issues (such as #10033 and #17101), but have not succeeded in fixing the problem.
Log
C:\Users\user>python
Python 3.6.6 (v3.6.6:4cf1f54eb7, Jun 27 2018, 03:37:03) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
<> import tensorflow as tf
Traceback (most recent call last):
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\user\AppData\Local\Programs\Python\Python36\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\user\AppData\Local\Programs\Python\Python36\lib\imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: DLL load failed: The specified module could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow_init_.py", line 22, in
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python_init_.py", line 49, in
from tensorflow.python import pywrap_tensorflow
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\user\AppData\Local\Programs\Python\Python36\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\user\AppData\Local\Programs\Python\Python36\lib\imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: DLL load failed: The specified module could not be found.
The text was updated successfully, but these errors were encountered: