Description
Hi all,
Using windows 7 and have made tensorflow work in the cpu version. But keep getting this error in the gpu version.
Installed it using pip install tensorflow-gpu. Have cuda 8.0 and cudnn 5.1. Have the dll file and cudnn files copied over. GPU model is K610M.
Thanks in advance for the assistance.
Capture of the screen:
(C:\Users\KiraYamato\Anaconda3) C:\Users\KiraYamato>activate tensorflow-gpu
(tensorflow-gpu) C:\Users\KiraYamato>python
Python 3.5.3 |Continuum Analytics, Inc.| (default, Feb 22 2017, 21:28:42) [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\KiraYamato\Anaconda3\envs\tensorflow-gpu\lib\site-packages\tens
orflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper
return importlib.import_module(mname)
File "C:\Users\KiraYamato\Anaconda3\envs\tensorflow-gpu\lib\importlib_init_
.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 986, in _gcd_import
File "", line 969, in _find_and_load
File "", line 958, in _find_and_load_unlocked
File "", line 666, in _load_unlocked
File "", line 577, in module_from_spec
File "", line 914, in create_module
File "", line 222, in _call_with_frames_removed
ImportError: DLL load failed: The specified procedure could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\KiraYamato\Anaconda3\envs\tensorflow-gpu\lib\site-packages\tens
orflow\python\pywrap_tensorflow.py", line 41, in
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\KiraYamato\Anaconda3\envs\tensorflow-gpu\lib\site-packages\tens
orflow\python\pywrap_tensorflow_internal.py", line 21, in
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\KiraYamato\Anaconda3\envs\tensorflow-gpu\lib\site-packages\tens
orflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper
return importlib.import_module('pywrap_tensorflow_internal')
File "C:\Users\KiraYamato\Anaconda3\envs\tensorflow-gpu\lib\importlib_init
.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: No module named '_pywrap_tensorflow_internal'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\KiraYamato\Anaconda3\envs\tensorflow-gpu\lib\site-packages\tens
orflow_init_.py", line 24, in
from tensorflow.python import *
File "C:\Users\KiraYamato\Anaconda3\envs\tensorflow-gpu\lib\site-packages\tens
orflow\python_init_.py", line 51, in
from tensorflow.python import pywrap_tensorflow
File "C:\Users\KiraYamato\Anaconda3\envs\tensorflow-gpu\lib\site-packages\tens
orflow\python\pywrap_tensorflow.py", line 52, in
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\KiraYamato\Anaconda3\envs\tensorflow-gpu\lib\site-packages\tens
orflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper
return importlib.import_module(mname)
File "C:\Users\KiraYamato\Anaconda3\envs\tensorflow-gpu\lib\importlib_init_
.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 986, in _gcd_import
File "", line 969, in _find_and_load
File "", line 958, in _find_and_load_unlocked
File "", line 666, in _load_unlocked
File "", line 577, in module_from_spec
File "", line 914, in create_module
File "", line 222, in _call_with_frames_removed
ImportError: DLL load failed: The specified procedure could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\KiraYamato\Anaconda3\envs\tensorflow-gpu\lib\site-packages\tens
orflow\python\pywrap_tensorflow.py", line 41, in
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\KiraYamato\Anaconda3\envs\tensorflow-gpu\lib\site-packages\tens
orflow\python\pywrap_tensorflow_internal.py", line 21, in
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\KiraYamato\Anaconda3\envs\tensorflow-gpu\lib\site-packages\tens
orflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper
return importlib.import_module('pywrap_tensorflow_internal')
File "C:\Users\KiraYamato\Anaconda3\envs\tensorflow-gpu\lib\importlib_init
.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: No module named '_pywrap_tensorflow_internal'
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/install_sources#common_installation_probl
ems
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
Activity
kdexd commentedon Apr 27, 2017
Hi @quatre008,
As the stack overflow link suggests, have you tried to invoke tensorflow by staying out of the source code directory?
Carmezim commentedon Apr 27, 2017
Hi @quatre008, sorry you're facing issues, could you please check if your CUDA and cuDNN DLLs are properly set on your
%PATH%
?quatre008 commentedon Apr 27, 2017
Hi,
@karandesai-96 I tried many different directories and still the same. Tensorflow worked but not tensorflow gpu.
@Carmezim How do I know if it is properly set? I only found the following:
PATH: C:\Users\KiraYamato\Anaconda3;C:\Users\KiraYamato\Anaconda3\Scripts;C:\Users\KiraYamato\Anaconda3\Library\bin
CUDA_PATH : C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0
CUDA_PATH_V8_0: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0
Carmezim commentedon Apr 27, 2017
@quatre008 what happens sometimes is that cuDNN DLLs are installed in a different directory of CUDA so you need to add it also. Make sure you installed cuDNN correctly and if its DLLs are not in those directories already in your
%PATH%
you need to add them.quatre008 commentedon Apr 27, 2017
@Carmezim I have copied the files into the same CUDA directory as mentioned. So I am guessing it should be working fine. I have re-downloaded and overwritten to make sure this was the case too.
Carmezim commentedon Apr 27, 2017
@quatre008 If you went over CUDA and cuDNN installation again and made sure you have everything properly set, completely uninstall TensorFlow and install it (only GPU) again. If the problem persists then it's not CUDA/cuDNN related.
quatre008 commentedon Apr 27, 2017
Ok I finally managed to resolve the issue.
2 issues at work here. One being my Visual Studio was not installed properly, and the second one (outside of this topic but still interesting) is that my laptop has dual graphics boot-up.
So for the first issue, I managed to resolve it by deleting most folders and restarting the installation, starting from visual studio (the free version of community VS2017 did not work previously).
Then as for the second issue, I only need to remove intel graphics from the bootup menu and solely use the K610M that I am having and everything is fine now, except for a list of warning messages that seems to be common in most cases.
Thanks for the help again. Much appreciated.
aselle commentedon Apr 27, 2017
Glad you got it resolved, and thank you for reporting information to help others in the future. Closing for now.
MuhammadHamed commentedon May 31, 2017
Hi @quatre008 ... I am having the same error as u had. Which visual studio version did u use ?
mateon1 commentedon Jun 10, 2017
Hi, I am having this issue on Linux. I am trying to install tensorflow with pypy.
My ./configure has everything default except the python interpreter
/usr/local/bin/pypy
.When importing I get:
ebonight337 commentedon Jul 4, 2017
@mateon1
https://stackoverflow.com/questions/35953210/error-running-basic-tensorflow-example
30 remaining items