I installed latest versions of CUDA and cuDNN to use tensorflow 1.14 in VS 2017 15.9.14, with Pyhton 3.7, Windows 7 64 bit, and RTX 2060, but when trying to run this code:
import tensorflow as tf
hello = tf.constant('Hello, Tensorflow on Windows!')
sess = tf.Session()
print(sess.run(hello))
I get this error at the first line (import tensorflow as tf)
ImportError
Message=Traceback (most recent call last):
File "C:\Program Files\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Program Files\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Program Files\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:\Program Files\Python37\lib\imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "C:\Program Files\Python37\lib\imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: DLL load failed with error code 3221225501
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
above this error message when asking for help.
StackTrace:
C:\Program Files\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow.py:74 in <module>
C:\Program Files\Python37\lib\site-packages\tensorflow\python\__init__.py:49 in <module>
C:\Program Files\Python37\lib\site-packages\tensorflow\__init__.py:28 in <module>
C:\Users\Pieza\source\repos\PythonApplication1\PythonApplication1\PythonApplication1.py:1 in <module>
What could possibly be the error code?