我正在遵循一个教程来使用Python(PyCharm)创建机器学习程序。我已经安装了适当的库,即使我按照本教程的说明操作,但在尝试运行代码时仍然遇到以下错误:
Traceback (most recent call last):
File "C:\Users\kanipoir\PycharmProjects\openaicart\venv\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\kanipoir\PycharmProjects\openaicart\venv\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\kanipoir\PycharmProjects\openaicart\venv\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "C:\Users\kanipoir\AppData\Local\Programs\Python\Python37\lib\imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "C:\Users\kanipoir\AppData\Local\Programs\Python\Python37\lib\imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: DLL load failed: The specified module could not be found.
在处理上述异常期间,发生了另一个异常:
Traceback (most recent call last):
File "C:/Users/kanipoir/PycharmProjects/openaicart/cartGame.py", line 4, in <module>
import tflearn
File "C:\Users\kanipoir\PycharmProjects\openaicart\venv\lib\site-packages\tflearn\__init__.py", line 4, in <module>
from . import config
File "C:\Users\kanipoir\PycharmProjects\openaicart\venv\lib\site-packages\tflearn\config.py", line 3, in <module>
import tensorflow as tf
File "C:\Users\kanipoir\PycharmProjects\openaicart\venv\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "C:\Users\kanipoir\PycharmProjects\openaicart\venv\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\Users\kanipoir\PycharmProjects\openaicart\venv\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\kanipoir\PycharmProjects\openaicart\venv\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\kanipoir\PycharmProjects\openaicart\venv\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\kanipoir\PycharmProjects\openaicart\venv\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "C:\Users\kanipoir\AppData\Local\Programs\Python\Python37\lib\imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "C:\Users\kanipoir\AppData\Local\Programs\Python\Python37\lib\imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: DLL load failed: The specified module could not be found.
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/errors
如果任何人有任何想法,任何帮助将不胜感激。 谢谢。