tensorflow: Failed to load the native TensorFlow runtime.

my python version is 3.5.2 cuda version is 8.0 and cudnn version is 6.14

but when I import tensorflow , I have get the follow error message, how I can solve it!

C:\Users\SXY004>python3
Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow
Traceback (most recent call last):
  File "C:\Users\SXY004\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 41, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "C:\Users\SXY004\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 35, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "C:\Users\SXY004\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 30, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "C:\Users\SXY004\AppData\Local\Programs\Python\Python35\lib\imp.py", line 242, in load_module
    return load_dynamic(name, filename, file)
  File "C:\Users\SXY004\AppData\Local\Programs\Python\Python35\lib\imp.py", line 342, in load_dynamic
    return _load(spec)
ImportError: DLL load failed: 找不到指定的模块。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\SXY004\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
    from tensorflow.python import *
  File "C:\Users\SXY004\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\__init__.py", line 51, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "C:\Users\SXY004\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 52, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "C:\Users\SXY004\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 41, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "C:\Users\SXY004\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 35, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "C:\Users\SXY004\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 30, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "C:\Users\SXY004\AppData\Local\Programs\Python\Python35\lib\imp.py", line 242, in load_module
    return load_dynamic(name, filename, file)
  File "C:\Users\SXY004\AppData\Local\Programs\Python\Python35\lib\imp.py", line 342, in load_dynamic
    return _load(spec)
ImportError: DLL load failed: 找不到指定的模块。

Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/install_sources#common_installation_problems

for some common reasons and solutions.  Include the entire stack trace
above this error message when asking for help.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 10
  • Comments: 31 (3 by maintainers)

Most upvoted comments

Could you try to run this script and see what it points you to?

just upgrade tensorflow with " pip install --upgrade tensorflow " command its worked for me

Please help me! Does not start TensorFlow.

my windows 10 x64 my python version is 3.6.2 (x64) cuda version is 8.0 and 9.0 (script https://gist.github.com/mrry/ee5dbcfdd045fa48a27d56664411d41c required all these libraries in turn) and cudnn version is 5.1 and 6.0 and 7 (script required all these libraries in turn)

script answer: ERROR: Failed to import the TensorFlow module.

=======================================

I solved the problem. It is necessary to put only those versions, which are indicated on the site tenserflov org. This check script does not work for the new version, no other versions need to be installed, only those that are listed on the official site!

To date, this is: python 3.6.2 (not 3.6.4) x64 CUDA 9.0 (not 9.1) CUDNN 7.0.5 for CUDA 9.0

pip install --upgrade --ignore-installed tensorflow-gpu==1.5

This solved my problem

ERROR! Session/line number was not unique in database. History logging moved to new session 122 Traceback (most recent call last): File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\interactiveshell.py”, line 3417, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File “<ipython-input-147-9346d54d892e>”, line 2, in <module> trainPredict = model.predict(trainX) NameError: name ‘model’ is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\interactiveshell.py”, line 2044, in showtraceback stb = value.render_traceback() AttributeError: ‘NameError’ object has no attribute ‘render_traceback

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py”, line 58, in <module> from tensorflow.python.pywrap_tensorflow_internal import * File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py”, line 2453, in <module> from tensorflow.python.util import deprecation File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow_core\python\util\deprecation.py”, line 25, in <module> from tensorflow.python.platform import tf_logging as logging ImportError: cannot import name ‘tf_logging’ from ‘tensorflow.python.platform’ (c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow\python\platform_init_.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\ultratb.py”, line 1169, in get_records return _fixed_getinnerframes(etb, number_of_lines_of_context, tb_offset) File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\ultratb.py”, line 316, in wrapped return f(*args, **kwargs) File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\ultratb.py”, line 350, in fixed_getinnerframes records = fix_frame_records_filenames(inspect.getinnerframes(etb, context)) File “c:\users\ad\appdata\local\programs\python\python37\lib\inspect.py”, line 1502, in getinnerframes frameinfo = (tb.tb_frame,) + getframeinfo(tb, context) File “c:\users\ad\appdata\local\programs\python\python37\lib\inspect.py”, line 1460, in getframeinfo filename = getsourcefile(frame) or getfile(frame) File “c:\users\ad\appdata\local\programs\python\python37\lib\inspect.py”, line 696, in getsourcefile if getattr(getmodule(object, filename), ‘loader’, None) is not None: File “c:\users\ad\appdata\local\programs\python\python37\lib\inspect.py”, line 733, in getmodule if ismodule(module) and hasattr(module, ‘file’): File "c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow_init.py", line 50, in getattr module = self.load() File "c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow_init.py", line 44, in _load module = importlib.import_module(self.name) File "c:\users\ad\appdata\local\programs\python\python37\lib\importlib_init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File “<frozen importlib._bootstrap>”, line 1006, in _gcd_import File “<frozen importlib._bootstrap>”, line 983, in _find_and_load File “<frozen importlib._bootstrap>”, line 953, in _find_and_load_unlocked File “<frozen importlib._bootstrap>”, line 219, in _call_with_frames_removed File “<frozen importlib._bootstrap>”, line 1006, in _gcd_import File “<frozen importlib._bootstrap>”, line 983, in _find_and_load File “<frozen importlib._bootstrap>”, line 967, in _find_and_load_unlocked File “<frozen importlib._bootstrap>”, line 677, in load_unlocked File “<frozen importlib._bootstrap_external>”, line 728, in exec_module File “<frozen importlib._bootstrap>”, line 219, in call_with_frames_removed File "c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow_core_init.py", line 28, in <module> from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import File "c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow_init.py", line 50, in getattr module = self.load() File "c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow_init.py", line 44, in _load module = importlib.import_module(self.name) File "c:\users\ad\appdata\local\programs\python\python37\lib\importlib_init.py", line 127, in import_module return _bootstrap.gcd_import(name[level:], package, level) File "c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow_core\python_init.py", line 49, in <module> from tensorflow.python import pywrap_tensorflow File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py”, line 74, in <module> raise ImportError(msg) ImportError: Traceback (most recent call last): File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\interactiveshell.py”, line 3417, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File “<ipython-input-147-9346d54d892e>”, line 2, in <module> trainPredict = model.predict(trainX) NameError: name ‘model’ is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\interactiveshell.py”, line 2044, in showtraceback stb = value.render_traceback() AttributeError: ‘NameError’ object has no attribute ‘render_traceback

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py”, line 58, in <module> from tensorflow.python.pywrap_tensorflow_internal import * File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py”, line 2453, in <module> from tensorflow.python.util import deprecation File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow_core\python\util\deprecation.py”, line 25, in <module> from tensorflow.python.platform import tf_logging as logging ImportError: cannot import name ‘tf_logging’ from ‘tensorflow.python.platform’ (c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow\python\platform_init_.py)

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. Traceback (most recent call last): File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\interactiveshell.py”, line 3417, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File “<ipython-input-147-9346d54d892e>”, line 2, in <module> trainPredict = model.predict(trainX) NameError: name ‘model’ is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\interactiveshell.py”, line 2044, in showtraceback stb = value.render_traceback() AttributeError: ‘NameError’ object has no attribute ‘render_traceback

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\interactiveshell.py”, line 3337, in run_ast_nodes if (await self.run_code(code, result, async_=asy)): File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\interactiveshell.py”, line 3434, in run_code self.showtraceback(running_compiled_code=True) File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\interactiveshell.py”, line 2047, in showtraceback value, tb, tb_offset=tb_offset) File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\ultratb.py”, line 1436, in structured_traceback self, etype, value, tb, tb_offset, number_of_lines_of_context) File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\ultratb.py”, line 1336, in structured_traceback self, etype, value, tb, tb_offset, number_of_lines_of_context File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\ultratb.py”, line 1193, in structured_traceback tb_offset) File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\ultratb.py”, line 1150, in format_exception_as_a_whole last_unique, recursion_repeat = find_recursion(orig_etype, evalue, records) File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\ultratb.py”, line 451, in find_recursion return len(records), 0 TypeError: object of type ‘NoneType’ has no len()

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\interactiveshell.py”, line 2044, in showtraceback stb = value.render_traceback() AttributeError: ‘TypeError’ object has no attribute ‘render_traceback

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py”, line 58, in <module> from tensorflow.python.pywrap_tensorflow_internal import * File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py”, line 2453, in <module> from tensorflow.python.util import deprecation File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow_core\python\util\deprecation.py”, line 25, in <module> from tensorflow.python.platform import tf_logging as logging ImportError: cannot import name ‘tf_logging’ from ‘tensorflow.python.platform’ (c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow\python\platform_init_.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\ultratb.py”, line 1169, in get_records return _fixed_getinnerframes(etb, number_of_lines_of_context, tb_offset) File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\ultratb.py”, line 316, in wrapped return f(*args, **kwargs) File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\ultratb.py”, line 350, in fixed_getinnerframes records = fix_frame_records_filenames(inspect.getinnerframes(etb, context)) File “c:\users\ad\appdata\local\programs\python\python37\lib\inspect.py”, line 1502, in getinnerframes frameinfo = (tb.tb_frame,) + getframeinfo(tb, context) File “c:\users\ad\appdata\local\programs\python\python37\lib\inspect.py”, line 1460, in getframeinfo filename = getsourcefile(frame) or getfile(frame) File “c:\users\ad\appdata\local\programs\python\python37\lib\inspect.py”, line 696, in getsourcefile if getattr(getmodule(object, filename), ‘loader’, None) is not None: File “c:\users\ad\appdata\local\programs\python\python37\lib\inspect.py”, line 733, in getmodule if ismodule(module) and hasattr(module, ‘file’): File "c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow_init.py", line 50, in getattr module = self.load() File "c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow_init.py", line 44, in _load module = importlib.import_module(self.name) File "c:\users\ad\appdata\local\programs\python\python37\lib\importlib_init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File “<frozen importlib._bootstrap>”, line 1006, in _gcd_import File “<frozen importlib._bootstrap>”, line 983, in _find_and_load File “<frozen importlib._bootstrap>”, line 953, in _find_and_load_unlocked File “<frozen importlib._bootstrap>”, line 219, in _call_with_frames_removed File “<frozen importlib._bootstrap>”, line 1006, in _gcd_import File “<frozen importlib._bootstrap>”, line 983, in _find_and_load File “<frozen importlib._bootstrap>”, line 967, in _find_and_load_unlocked File “<frozen importlib._bootstrap>”, line 677, in load_unlocked File “<frozen importlib._bootstrap_external>”, line 728, in exec_module File “<frozen importlib._bootstrap>”, line 219, in call_with_frames_removed File "c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow_core_init.py", line 28, in <module> from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import File "c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow_init.py", line 50, in getattr module = self.load() File "c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow_init.py", line 44, in _load module = importlib.import_module(self.name) File "c:\users\ad\appdata\local\programs\python\python37\lib\importlib_init.py", line 127, in import_module return _bootstrap.gcd_import(name[level:], package, level) File "c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow_core\python_init.py", line 49, in <module> from tensorflow.python import pywrap_tensorflow File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py”, line 74, in <module> raise ImportError(msg) ImportError: Traceback (most recent call last): File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\interactiveshell.py”, line 3417, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File “<ipython-input-147-9346d54d892e>”, line 2, in <module> trainPredict = model.predict(trainX) NameError: name ‘model’ is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\interactiveshell.py”, line 2044, in showtraceback stb = value.render_traceback() AttributeError: ‘NameError’ object has no attribute ‘render_traceback

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\interactiveshell.py”, line 3337, in run_ast_nodes if (await self.run_code(code, result, async_=asy)): File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\interactiveshell.py”, line 3434, in run_code self.showtraceback(running_compiled_code=True) File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\interactiveshell.py”, line 2047, in showtraceback value, tb, tb_offset=tb_offset) File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\ultratb.py”, line 1436, in structured_traceback self, etype, value, tb, tb_offset, number_of_lines_of_context) File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\ultratb.py”, line 1336, in structured_traceback self, etype, value, tb, tb_offset, number_of_lines_of_context File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\ultratb.py”, line 1193, in structured_traceback tb_offset) File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\ultratb.py”, line 1150, in format_exception_as_a_whole last_unique, recursion_repeat = find_recursion(orig_etype, evalue, records) File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\ultratb.py”, line 451, in find_recursion return len(records), 0 TypeError: object of type ‘NoneType’ has no len()

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\interactiveshell.py”, line 2044, in showtraceback stb = value.render_traceback() AttributeError: ‘TypeError’ object has no attribute ‘render_traceback

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py”, line 58, in <module> from tensorflow.python.pywrap_tensorflow_internal import * File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py”, line 2453, in <module> from tensorflow.python.util import deprecation File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow_core\python\util\deprecation.py”, line 25, in <module> from tensorflow.python.platform import tf_logging as logging ImportError: cannot import name ‘tf_logging’ from ‘tensorflow.python.platform’ (c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow\python\platform_init_.py)

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. Traceback (most recent call last): File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\interactiveshell.py”, line 3417, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File “<ipython-input-147-9346d54d892e>”, line 2, in <module> trainPredict = model.predict(trainX) NameError: name ‘model’ is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\interactiveshell.py”, line 2044, in showtraceback stb = value.render_traceback() AttributeError: ‘NameError’ object has no attribute ‘render_traceback

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\interactiveshell.py”, line 3337, in run_ast_nodes if (await self.run_code(code, result, async_=asy)): File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\interactiveshell.py”, line 3434, in run_code self.showtraceback(running_compiled_code=True) File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\interactiveshell.py”, line 2047, in showtraceback value, tb, tb_offset=tb_offset) File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\ultratb.py”, line 1436, in structured_traceback self, etype, value, tb, tb_offset, number_of_lines_of_context) File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\ultratb.py”, line 1336, in structured_traceback self, etype, value, tb, tb_offset, number_of_lines_of_context File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\ultratb.py”, line 1193, in structured_traceback tb_offset) File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\ultratb.py”, line 1150, in format_exception_as_a_whole last_unique, recursion_repeat = find_recursion(orig_etype, evalue, records) File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\ultratb.py”, line 451, in find_recursion return len(records), 0 TypeError: object of type ‘NoneType’ has no len()

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\interactiveshell.py”, line 2044, in showtraceback stb = value.render_traceback() AttributeError: ‘TypeError’ object has no attribute ‘render_traceback

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\interactiveshell.py”, line 2922, in _run_cell return runner(coro) File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\async_helpers.py”, line 68, in _pseudo_sync_runner coro.send(None) File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\interactiveshell.py”, line 3146, in run_cell_async interactivity=interactivity, compiler=compiler, result=result) File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\interactiveshell.py”, line 3356, in run_ast_nodes self.showtraceback() File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\interactiveshell.py”, line 2047, in showtraceback value, tb, tb_offset=tb_offset) File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\ultratb.py”, line 1436, in structured_traceback self, etype, value, tb, tb_offset, number_of_lines_of_context) File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\ultratb.py”, line 1336, in structured_traceback self, etype, value, tb, tb_offset, number_of_lines_of_context File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\ultratb.py”, line 1211, in structured_traceback chained_exceptions_tb_offset) File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\ultratb.py”, line 1150, in format_exception_as_a_whole last_unique, recursion_repeat = find_recursion(orig_etype, evalue, records) File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\ultratb.py”, line 451, in find_recursion return len(records), 0 TypeError: object of type ‘NoneType’ has no len()

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\interactiveshell.py”, line 2044, in showtraceback stb = value.render_traceback() AttributeError: ‘TypeError’ object has no attribute ‘render_traceback

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py”, line 58, in <module> from tensorflow.python.pywrap_tensorflow_internal import * File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py”, line 2453, in <module> from tensorflow.python.util import deprecation File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow_core\python\util\deprecation.py”, line 25, in <module> from tensorflow.python.platform import tf_logging as logging ImportError: cannot import name ‘tf_logging’ from ‘tensorflow.python.platform’ (c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow\python\platform_init_.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\ultratb.py”, line 1169, in get_records return _fixed_getinnerframes(etb, number_of_lines_of_context, tb_offset) File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\ultratb.py”, line 316, in wrapped return f(*args, **kwargs) File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\ultratb.py”, line 350, in fixed_getinnerframes records = fix_frame_records_filenames(inspect.getinnerframes(etb, context)) File “c:\users\ad\appdata\local\programs\python\python37\lib\inspect.py”, line 1502, in getinnerframes frameinfo = (tb.tb_frame,) + getframeinfo(tb, context) File “c:\users\ad\appdata\local\programs\python\python37\lib\inspect.py”, line 1460, in getframeinfo filename = getsourcefile(frame) or getfile(frame) File “c:\users\ad\appdata\local\programs\python\python37\lib\inspect.py”, line 696, in getsourcefile if getattr(getmodule(object, filename), ‘loader’, None) is not None: File “c:\users\ad\appdata\local\programs\python\python37\lib\inspect.py”, line 733, in getmodule if ismodule(module) and hasattr(module, ‘file’): File "c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow_init.py", line 50, in getattr module = self.load() File "c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow_init.py", line 44, in _load module = importlib.import_module(self.name) File "c:\users\ad\appdata\local\programs\python\python37\lib\importlib_init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File “<frozen importlib._bootstrap>”, line 1006, in _gcd_import File “<frozen importlib._bootstrap>”, line 983, in _find_and_load File “<frozen importlib._bootstrap>”, line 953, in _find_and_load_unlocked File “<frozen importlib._bootstrap>”, line 219, in _call_with_frames_removed File “<frozen importlib._bootstrap>”, line 1006, in _gcd_import File “<frozen importlib._bootstrap>”, line 983, in _find_and_load File “<frozen importlib._bootstrap>”, line 967, in _find_and_load_unlocked File “<frozen importlib._bootstrap>”, line 677, in load_unlocked File “<frozen importlib._bootstrap_external>”, line 728, in exec_module File “<frozen importlib._bootstrap>”, line 219, in call_with_frames_removed File "c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow_core_init.py", line 28, in <module> from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import File "c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow_init.py", line 50, in getattr module = self.load() File "c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow_init.py", line 44, in _load module = importlib.import_module(self.name) File "c:\users\ad\appdata\local\programs\python\python37\lib\importlib_init.py", line 127, in import_module return _bootstrap.gcd_import(name[level:], package, level) File "c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow_core\python_init.py", line 49, in <module> from tensorflow.python import pywrap_tensorflow File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py”, line 74, in <module> raise ImportError(msg) ImportError: Traceback (most recent call last): File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\interactiveshell.py”, line 3417, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File “<ipython-input-147-9346d54d892e>”, line 2, in <module> trainPredict = model.predict(trainX) NameError: name ‘model’ is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\interactiveshell.py”, line 2044, in showtraceback stb = value.render_traceback() AttributeError: ‘NameError’ object has no attribute ‘render_traceback

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\interactiveshell.py”, line 3337, in run_ast_nodes if (await self.run_code(code, result, async_=asy)): File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\interactiveshell.py”, line 3434, in run_code self.showtraceback(running_compiled_code=True) File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\interactiveshell.py”, line 2047, in showtraceback value, tb, tb_offset=tb_offset) File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\ultratb.py”, line 1436, in structured_traceback self, etype, value, tb, tb_offset, number_of_lines_of_context) File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\ultratb.py”, line 1336, in structured_traceback self, etype, value, tb, tb_offset, number_of_lines_of_context File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\ultratb.py”, line 1193, in structured_traceback tb_offset) File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\ultratb.py”, line 1150, in format_exception_as_a_whole last_unique, recursion_repeat = find_recursion(orig_etype, evalue, records) File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\ultratb.py”, line 451, in find_recursion return len(records), 0 TypeError: object of type ‘NoneType’ has no len()

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\interactiveshell.py”, line 2044, in showtraceback stb = value.render_traceback() AttributeError: ‘TypeError’ object has no attribute ‘render_traceback

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\interactiveshell.py”, line 2922, in _run_cell return runner(coro) File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\async_helpers.py”, line 68, in _pseudo_sync_runner coro.send(None) File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\interactiveshell.py”, line 3146, in run_cell_async interactivity=interactivity, compiler=compiler, result=result) File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\interactiveshell.py”, line 3356, in run_ast_nodes self.showtraceback() File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\interactiveshell.py”, line 2047, in showtraceback value, tb, tb_offset=tb_offset) File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\ultratb.py”, line 1436, in structured_traceback self, etype, value, tb, tb_offset, number_of_lines_of_context) File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\ultratb.py”, line 1336, in structured_traceback self, etype, value, tb, tb_offset, number_of_lines_of_context File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\ultratb.py”, line 1211, in structured_traceback chained_exceptions_tb_offset) File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\ultratb.py”, line 1150, in format_exception_as_a_whole last_unique, recursion_repeat = find_recursion(orig_etype, evalue, records) File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\ultratb.py”, line 451, in find_recursion return len(records), 0 TypeError: object of type ‘NoneType’ has no len()

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\IPython\core\interactiveshell.py”, line 2044, in showtraceback stb = value.render_traceback() AttributeError: ‘TypeError’ object has no attribute ‘render_traceback

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py”, line 58, in <module> from tensorflow.python.pywrap_tensorflow_internal import * File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py”, line 2453, in <module> from tensorflow.python.util import deprecation File “c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow_core\python\util\deprecation.py”, line 25, in <module> from tensorflow.python.platform import tf_logging as logging ImportError: cannot import name ‘tf_logging’ from ‘tensorflow.python.platform’ (c:\users\ad\appdata\local\programs\python\python37\lib\site-packages\tensorflow\python\platform_init_.py)

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.

I think you had the right settings at first but maybe haven’t included the CUDA/cuDNN DLLs directory in your %PATH%, like a bad installation. You should try to install TensorFlow 1.3/1.4 with GPU support, unless for an specific reason you need the older version, along with cuDNN 6.x like before but making sure both CUDA and cuDNN directories are present in your %PATH%. Could you try it and follow up?

this is tensorflow-gpu version image