最重要的是,我不编码。 但出于好奇,我开始检查unity。我正在尝试一个关于使用python和tensorflow在卡丁车游戏中学习AI的教程,我在视频中做了一切来安装它们(他们说这是我运行这个教程所需要的全部)。 所以在建立了我的虚拟环境之后,我运行了这个
C:\Users\L\MyFirstGame>mlagents-learn Assets\Karting\Prefabs\AI\kart_mg_trainer_config.yaml --train --run-id=custom-track-1
我得到了这个
Traceback (most recent call last):
File "c:\users\l\myfirstgame\venv\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "c:\users\l\myfirstgame\venv\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "c:\users\l\myfirstgame\venv\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "C:\Users\L\AppData\Local\Programs\Python\Python37\lib\imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "C:\Users\L\AppData\Local\Programs\Python\Python37\lib\imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed.
During handling of the above exception another exception occurred:
Traceback (most recent call last):
File "C:\Users\L\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Users\L\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\L\MyFirstGame\venv\Scripts\mlagents-learn.exe\__main__.py", line 5, in <module>
File "c:\users\l\myfirstgame\venv\lib\site-packages\mlagents\trainers\learn.py", line 15, in <module>
from mlagents import tf_utils
File "c:\users\l\myfirstgame\venv\lib\site-packages\mlagents\tf_utils\__init__.py", line 1, in <module>
from mlagents.tf_utils.tf import tf as tf # noqa
File "c:\users\l\myfirstgame\venv\lib\site-packages\mlagents\tf_utils\tf.py", line 3, in <module>
import tensorflow as tf # noqa I201
File "c:\users\l\myfirstgame\venv\lib\site-packages\tensorflow\__init__.py", line 98, in <module>
from tensorflow_core import *
File "c:\users\l\myfirstgame\venv\lib\site-packages\tensorflow_core\__init__.py", line 40, in <module>
from tensorflow.python.tools import module_util as _module_util
File "c:\users\l\myfirstgame\venv\lib\site-packages\tensorflow\__init__.py", line 50, in __getattr__
module = self._load()
File "c:\users\l\myfirstgame\venv\lib\site-packages\tensorflow\__init__.py", line 44, in _load
module = _importlib.import_module(self.__name__)
File "C:\Users\L\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\l\myfirstgame\venv\lib\site-packages\tensorflow_core\python\__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "c:\users\l\myfirstgame\venv\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\l\myfirstgame\venv\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "c:\users\l\myfirstgame\venv\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "c:\users\l\myfirstgame\venv\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "C:\Users\L\AppData\Local\Programs\Python\Python37\lib\imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "C:\Users\L\AppData\Local\Programs\Python\Python37\lib\imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed.
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.
我确实检查了tensorflow页面,找到了错误的解决方案,但没有帮助,所以我来了
我猜你想使用tensorflow gpu,但错误显示tf无法加载cudnn的dll。(我猜),可能你没有安装cudnn,或者你的tensorflow gpu版本不适合你的gpu和cudnn
相关问题 更多 >
编程相关推荐