DLLのロードに失敗しました:指定されたモジュールが見つかりませんネイティブTensorFlowランタイムソリューションのロードに失敗しました



Dll Load Failed Cannot Find Specified Module Failed Load Native Tensorflow Runtime Solution



完全なエラーメッセージは次のとおりです。

Traceback (most recent call last): File 'C:Users oyAppDataLocalProgramsPythonPython35libsite-packages ensorflowpythonpywrap_tensorflow_internal.py', line 18, in swig_import_helper return importlib.import_module(mname) File 'C:Users oyAppDataLocalProgramsPythonPython35libimportlib\__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 906, in create_module File '', line 222, in _call_with_frames_removed 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 'C:Users oyAppDataLocalProgramsPythonPython35libsite-packages ensorflowpythonpywrap_tensorflow.py', line 41, in from tensorflow.python.pywrap_tensorflow_internal import * File 'C:Users oyAppDataLocalProgramsPythonPython35libsite-packages ensorflowpythonpywrap_tensorflow_internal.py', line 21, in _pywrap_tensorflow_internal = swig_import_helper() File 'C:Users oyAppDataLocalProgramsPythonPython35libsite-packages ensorflowpythonpywrap_tensorflow_internal.py', line 20, in swig_import_helper return importlib.import_module('_pywrap_tensorflow_internal') File 'C:Users oyAppDataLocalProgramsPythonPython35libimportlib\__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 oyAppDataLocalProgramsPythonPython35libsite-packages ensorflow\__init__.py', line 24, in from tensorflow.python import * File 'C:Users oyAppDataLocalProgramsPythonPython35libsite-packages ensorflowpython\__init__.py', line 51, in from tensorflow.python import pywrap_tensorflow File 'C:Users oyAppDataLocalProgramsPythonPython35libsite-packages ensorflowpythonpywrap_tensorflow.py', line 52, in raise ImportError(msg) ImportError: Traceback (most recent call last): File 'C:Users oyAppDataLocalProgramsPythonPython35libsite-packages ensorflowpythonpywrap_tensorflow_internal.py', line 18, in swig_import_helper return importlib.import_module(mname) File 'C:Users oyAppDataLocalProgramsPythonPython35libimportlib\__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 906, in create_module File '', line 222, in _call_with_frames_removed 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 'C:Users oyAppDataLocalProgramsPythonPython35libsite-packages ensorflowpythonpywrap_tensorflow.py', line 41, in from tensorflow.python.pywrap_tensorflow_internal import * File 'C:Users oyAppDataLocalProgramsPythonPython35libsite-packages ensorflowpythonpywrap_tensorflow_internal.py', line 21, in _pywrap_tensorflow_internal = swig_import_helper() File 'C:Users oyAppDataLocalProgramsPythonPython35libsite-packages ensorflowpythonpywrap_tensorflow_internal.py', line 20, in swig_import_helper return importlib.import_module('_pywrap_tensorflow_internal') File 'C:Users oyAppDataLocalProgramsPythonPython35libimportlib\__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_problems for some common reasons and solutions. Include the entire stack trace above this error message when asking for help.

エラーの理由は次のとおりです



バージョンの問題

私のコンピューターでは、cuddnは6.0に置き換えられています。 TensorFlow1.3 + python3.6 + cuda8.0 + cudnn5.0もこのエラーになる前に、cudnn6.0に置き換えることができます。以下は他のバージョンです。

Tensorflow-gpu v1.9.0 | cuda9.0 | cuDNN7.1.4実現可能|備考:7.0.4 / 7.0.5 /7.1.2は明確ではありません



Tensorflow-gpu v1.8.0 | cuda9.0 | cuDNN不明|備考:7.0.4 / 7.0.5 / 7.1.2 / 7.1.4

Tensorflow-gpu v1.7.0 | cuda9.0 | cuDNN不明|備考:7.0.4 / 7.0.5 / 7.1.2 / 7.1.4

Tensorflow-gpu v1.6.0 | cuda9.0 | cuDNN不明|備考:7.0.4 / 7.0.5 / 7.1.2 / 7.1.4



Tensorflow-gpu v1.5.0 | cuda9.0 | cuDNN不明|備考:7.0.4 / 7.0.5 / 7.1.2 / 7.1.4

Tensorflow-gpu v1.4.0 | cuda8.0 | cuDNN 6.0 |備考:6.0通常使用、7.0.5利用不可、5.1不明

Tensorflow-gpu v1.3.0 | cuda8.0 | cuDNN 6.0 |備考:6.0通常使用、7.0.5利用不可、5.1不明

Tensorflow-gpu v1.2.0 | cuda8.0 | cuDNN 5.1 |備考:5.1通常使用、6.0 /7.0.5不明

Tensorflow-gpu v1.1.0 | cuda8.0 | cuDNN 5.1 |備考:5.1通常使用、6.0 /7.0.5不明

バージョンに互換性がない場合、以前にcudnn5.1をインストールしたことがある場合、TensorFlowが1.3以上の場合は、cudnn64_5をcudnn64_6に変更するだけです。

2.環境問題

  • Pythonのバージョンが高すぎるため、3.6に変更してください。
  • Visual Studio 2015vc_redist.x64用のVisualC ++再頒布可能パッケージをインストールして解決します。
  • MSVCP140.DLLがシステムにあることを確認してください。そうでない場合は、 ここに ダウンロード
  • CUDAディレクトリ内のbin、lib / x64、およびその他のパスを含め、システムのPATH環境変数が正しく設定されていることを確認してください。
  • コンピュータが正しくインストールされていることを確認してください DXSDK_Jun10

最後に、インストールする前にtensorflowcleanをアンインストールすることを忘れないでください。

pip uninstall tensorflow pip uninstall tensorflow-gpu