Q&A
前提・実現したいこと
Tensorflow-GPUの環境構築で
CUDA9.0インストールしてCUDNNv7.1forCUDA9.0の中身も移動しました。
PATHも通しているはずですが
いざimportしようとすると以下のエラーメッセージが出ました
GPU版実装は問題が多いらしいですがどうすればよろしいのでしょうか
発生している問題・エラーメッセージ
ImportError Traceback (most recent call last)
~\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py in swig_import_helper()
17 try:
---> 18 return importlib.import_module(mname)
19 except ImportError:
~\Anaconda3\envs\tensorflow\lib\importlib_init_.py in import_module(name, package)
125 level += 1
--> 126 return _bootstrap._gcd_import(name[level:], package, level)
127
~\Anaconda3\envs\tensorflow\lib\importlib_bootstrap.py in _gcd_import(name, package, level)
~\Anaconda3\envs\tensorflow\lib\importlib_bootstrap.py in find_and_load(name, import)
~\Anaconda3\envs\tensorflow\lib\importlib_bootstrap.py in find_and_load_unlocked(name, import)
~\Anaconda3\envs\tensorflow\lib\importlib_bootstrap.py in _load_unlocked(spec)
~\Anaconda3\envs\tensorflow\lib\importlib_bootstrap.py in module_from_spec(spec)
~\Anaconda3\envs\tensorflow\lib\importlib_bootstrap_external.py in create_module(self, spec)
~\Anaconda3\envs\tensorflow\lib\importlib_bootstrap.py in _call_with_frames_removed(f, *args, **kwds)
ImportError: DLL load failed: 指定されたモジュールが見つかりません。
During handling of the above exception, another exception occurred:
ModuleNotFoundError Traceback (most recent call last)
~\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow.py in <module>()
40 sys.setdlopenflags(_default_dlopen_flags | ctypes.RTLD_GLOBAL)
---> 41 from tensorflow.python.pywrap_tensorflow_internal import *
42 from tensorflow.python.pywrap_tensorflow_internal import version
~\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py in <module>()
20 return importlib.import_module('_pywrap_tensorflow_internal')
---> 21 _pywrap_tensorflow_internal = swig_import_helper()
22 del swig_import_helper
~\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py in swig_import_helper()
19 except ImportError:
---> 20 return importlib.import_module('_pywrap_tensorflow_internal')
21 _pywrap_tensorflow_internal = swig_import_helper()
~\Anaconda3\envs\tensorflow\lib\importlib_init_.py in import_module(name, package)
125 level += 1
--> 126 return _bootstrap._gcd_import(name[level:], package, level)
127
ModuleNotFoundError: No module named '_pywrap_tensorflow_internal'
During handling of the above exception, another exception occurred:
ImportError Traceback (most recent call last)
<ipython-input-2-64156d691fe5> in <module>()
----> 1 import tensorflow as tf
~\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow_init_.py in <module>()
22
23 # pylint: disable=wildcard-import
---> 24 from tensorflow.python import *
25 # pylint: enable=wildcard-import
26
~\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python_init_.py in <module>()
49 import numpy as np
50
---> 51 from tensorflow.python import pywrap_tensorflow
52
53 # Protocol buffers
~\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow.py in <module>()
50 for some common reasons and solutions. Include the entire stack trace
51 above this error message when asking for help.""" % traceback.format_exc()
---> 52 raise ImportError(msg)
53
54 # pylint: enable=wildcard-import,g-import-not-at-top,unused-import,line-too-long
ImportError: Traceback (most recent call last):
File "C:\Users\Tsai Tensei\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper
return importlib.import_module(mname)
File "C:\Users\Tsai Tensei\Anaconda3\envs\tensorflow\lib\importlib_init_.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 658, in _load_unlocked
File "<frozen importlib._bootstrap>", line 571, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 922, in create_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
ImportError: DLL load failed: 指定されたモジュールが見つかりません。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Tsai Tensei\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 41, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\Tsai Tensei\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 21, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\Tsai Tensei\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper
return importlib.import_module('pywrap_tensorflow_internal')
File "C:\Users\Tsai Tensei\Anaconda3\envs\tensorflow\lib\importlib_init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: 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.
該当のソースコード
ソースコード
試したこと
ここに問題に対して試したことを記載してください。
補足情報(FW/ツールのバージョンなど)
ここにより詳細な情報を記載してください。
回答1件
あなたの回答
tips
プレビュー
下記のような回答は推奨されていません。
このような回答には修正を依頼しましょう。