When I pip tensorflow==2.0.0-alpha0
and I run:
import tensorflow as tf
print(tf.version)
print(tf.test.is_gpu_available())
I get
2.0.0-alpha0
False
I did a compete clean reinstall of:
Python 3.7.3
PyCharm
Anaconda 3.7.x
and then did:
pip install --user tensorflow-gpu==2.0.0-alpha0
(no pip tensorflow==2.0.0-alpha0)
pip install --user tensorflow-datasets
When I run: python
import tensorflow as tf
I get:
C:\Users\steph\PycharmProjects\Image1\TF2>python
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 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\steph\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\pywrap_tensorflow.py”, line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File “C:\Users\steph\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\pywrap_tensorflow_internal.py”, line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File “C:\Users\steph\AppData\Roaming\Python\Python37\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\steph\AppData\Local\Programs\Python\Python37\lib\imp.py”, line 242, in load_module
return load_dynamic(name, filename, file)
File “C:\Users\steph\AppData\Local\Programs\Python\Python37\lib\imp.py”, line 342, 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\steph\AppData\Roaming\Python\Python37\site-packages\tensorflow_init_.py”, line 27, in
from tensorflow.api.v2 import audio
File "C:\Users\steph\AppData\Roaming\Python\Python37\site-packages\tensorflow_api\v2\audio_init.py", line 8, in
from tensorflow.python.ops.gen_audio_ops import decode_wav
File “C:\Users\steph\AppData\Roaming\Python\Python37\site-packages\tensorflow\python_init_.py”, line 49, in
from tensorflow.python import pywrap_tensorflow
File “C:\Users\steph\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\pywrap_tensorflow.py”, line 74, in
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File “C:\Users\steph\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\pywrap_tensorflow.py”, line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File “C:\Users\steph\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\pywrap_tensorflow_internal.py”, line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File “C:\Users\steph\AppData\Roaming\Python\Python37\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\steph\AppData\Local\Programs\Python\Python37\lib\imp.py”, line 242, in load_module
return load_dynamic(name, filename, file)
File “C:\Users\steph\AppData\Local\Programs\Python\Python37\lib\imp.py”, line 342, in load_dynamic
return _load(spec)
ImportError: DLL load failed: The specified module could not be found.
Failed to load the native TensorFlow runtime.
See Создание и установка сообщений об ошибках | TensorFlow
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
How do I get GPU to work?
My path is:
C:\Users\steph\PycharmProjects\Image2>path
PATH=C:\tools\cuda\lib\x64;C:\tools\cuda\bin;C:\Users\steph\AppData\Roaming\Python\Python37\Scripts;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\extras\CUPTI\lib64;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\lib\x64;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\libnvvp;C:\Program Files\Python37\Scripts;C:\Program Files\Python37;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\MATLAB\R2019a\bin;C:\Program Files\MATLAB\R2018b\bin;C:\Program Files\MATLAB\R2018a\bin;C:\Program Files\MATLAB\R2014a\bin;C:\Program Files\dotnet;C:\Program Files\MATLAB\MATLAB Runtime\v901\runtime\win64;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\NVIDIA Corporation\Nsight Compute 2019.1;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Users\steph\AppData\Local\Programs\Python\Python37\Scripts;C:\Users\steph\AppData\Local\Programs\Python\Python37;C:\Users\steph\AppData\Local\Microsoft\WindowsApps;;C:\Program Files\JetBrains\PyCharm Community Edition 2019.1.1\bin;;C:\Users\steph\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon\
Where c:\tools\cuda\bin\cudnn64_7.dll