En ce qui concerne l'erreur d'importation tensorflow

0

alors que j'essayais d'importer tensorflow, l'erreur suivante se glissait

C:\Windows\system32>python
Python 3.5.4 (v3.5.4:3f56838, Aug  8 2017, 02:17:05) [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:\Program Files\Python35\lib\site-packages\tensorflow\python\pywrap_ten
sorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "C:\Program Files\Python35\lib\site-packages\tensorflow\python\pywrap_ten
sorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "C:\Program Files\Python35\lib\site-packages\tensorflow\python\pywrap_ten
sorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, descript
ion)
  File "C:\Program Files\Python35\lib\imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "C:\Program Files\Python35\lib\imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: DLL load failed with error code -1073741795

Lors du traitement de l'exception ci-dessus, une autre exception s'est produite:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Program Files\Python35\lib\site-packages\tensorflow\__init__.py", lin
e 24, in <module>
    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-im
port
  File "C:\Program Files\Python35\lib\site-packages\tensorflow\python\__init__.p
y", line 49, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "C:\Program Files\Python35\lib\site-packages\tensorflow\python\pywrap_ten
sorflow.py", line 74, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "C:\Program Files\Python35\lib\site-packages\tensorflow\python\pywrap_ten
sorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "C:\Program Files\Python35\lib\site-packages\tensorflow\python\pywrap_ten
sorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "C:\Program Files\Python35\lib\site-packages\tensorflow\python\pywrap_ten
sorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, descript
ion)
  File "C:\Program Files\Python35\lib\imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "C:\Program Files\Python35\lib\imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: DLL load failed with error code -1073741795


Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/errors

la source

Réponses:

0

Cela peut être dû au fait que TensorFlow tente d’accéder au GPU lorsque la version requise de CUDA n’est pas présente sur votre ordinateur, comme suggéré ici. cette question de Github

gireesh4manu
la source