1

我在让我的 RL 程序开始工作时遇到问题。我首先安装了 stable-baselines 和 procgen。

pip install stable-baselines procgen

然后我安装了 tensorflow 和 tensorflow-gpu

pip install tensorflow==1.14.0 tensorflow-gpu==1.14.0

我安装了 CUDA 10.0,但我不断收到此错误

(procgenTests) λ python procgenTest.py
Traceback (most recent call last):
  File "C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\tensorflow\python\platform\self_check.py", line 75, in preload_check
    ctypes.WinDLL(build_info.cudart_dll_name)
  File "C:\Users\Owner\AppData\Local\Programs\Python\Python37\lib\ctypes\__init__.py", line 364, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "procgenTest.py", line 3, in <module>
    from stable_baselines import PPO2
  File "C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\stable_baselines\__init__.py", line 1, in <module>
    from stable_baselines.a2c import A2C
  File "C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\stable_baselines\a2c\__init__.py", line 1, in <module>
    from stable_baselines.a2c.a2c import A2C
  File "C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\stable_baselines\a2c\a2c.py", line 5, in <module>
    import tensorflow as tf
  File "C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\tensorflow\__init__.py", line 28, in <module>
    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
  File "C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 30, in <module>
    self_check.preload_check()
  File "C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\tensorflow\python\platform\self_check.py", line 82, in preload_check
    % (build_info.cudart_dll_name, build_info.cuda_version_number))
ImportError: Could not find 'cudart64_100.dll'. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. Download and install CUDA 10.0 from this URL: https://developer.nvidia.com/cuda-90-download-archive

更新我的情况,我发现了更多说明,看起来它离工作更近了,但现在它向我展示了这一点

Traceback (most recent call last):
  File "C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\tensorflow\python\platform\self_check.py", line 87, in preload_check
    ctypes.WinDLL(build_info.cudnn_dll_name)
  File "C:\Users\Owner\AppData\Local\Programs\Python\Python37\lib\ctypes\__init__.py", line 364, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "procgenTest.py", line 3, in <module>
    from stable_baselines import PPO2
  File "C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\stable_baselines\__init__.py", line 1, in <module>
    from stable_baselines.a2c import A2C
  File "C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\stable_baselines\a2c\__init__.py", line 1, in <module>
    from stable_baselines.a2c.a2c import A2C
  File "C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\stable_baselines\a2c\a2c.py", line 5, in <module>
    import tensorflow as tf
  File "C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\tensorflow\__init__.py", line 28, in <module>
    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
  File "C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 30, in <module>
    self_check.preload_check()
  File "C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\tensorflow\python\platform\self_check.py", line 97, in preload_check
    % (build_info.cudnn_dll_name, build_info.cudnn_version_number))
ImportError: Could not find 'cudnn64_7.dll'. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. Note that installing cuDNN is a separate step from installing CUDA, and this DLL is often found in a different directory from the CUDA DLLs. You may install the necessary DLL by downloading cuDNN 7 from this URL: https://developer.nvidia.com/cudnn

C:\Users\Owner\Projects\PythonProjects\procgenTests
(procgenTests) λ python procgenTest.py
C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\tensorflow\python\framework\dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\tensorflow\python\framework\dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\tensorflow\python\framework\dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\tensorflow\python\framework\dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\tensorflow\python\framework\dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\tensorflow\python\framework\dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
Traceback (most recent call last):
  File "procgenTest.py", line 10, in <module>
    model = PP02(MlpPolicy, env, verbose=1)
NameError: name 'PP02' is not defined
Exception ignored in: <function CVecEnv.__del__ at 0x000001FC36FBFDC8>
Traceback (most recent call last):
  File "C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\procgen\libenv.py", line 560, in __del__
  File "C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\procgen\libenv.py", line 533, in close
  File "C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\cffi\api.py", line 912, in __getattr__
  File "C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\cffi\api.py", line 908, in make_accessor
  File "C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\cffi\api.py", line 837, in accessor_function
  File "C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\cffi\api.py", line 440, in _get_cached_btype
  File "C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\cffi\model.py", line 60, in get_cached_btype
  File "C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\cffi\model.py", line 255, in build_backend_type
TypeError: 'NoneType' object is not callable

C:\Users\Owner\Projects\PythonProjects\procgenTests
(procgenTests) λ python procgenTest.py
C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\tensorflow\python\framework\dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\tensorflow\python\framework\dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\tensorflow\python\framework\dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\tensorflow\python\framework\dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\tensorflow\python\framework\dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\tensorflow\python\framework\dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
Traceback (most recent call last):
  File "procgenTest.py", line 10, in <module>
    model = PP02(MlpPolicy, env, verbose=1)
NameError: name 'PP02' is not defined
Exception ignored in: <function CVecEnv.__del__ at 0x0000020AE557EE58>
Traceback (most recent call last):
  File "C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\procgen\libenv.py", line 560, in __del__
  File "C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\procgen\libenv.py", line 533, in close
  File "C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\cffi\api.py", line 912, in __getattr__
  File "C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\cffi\api.py", line 908, in make_accessor
  File "C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\cffi\api.py", line 837, in accessor_function
  File "C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\cffi\api.py", line 440, in _get_cached_btype
  File "C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\cffi\model.py", line 60, in get_cached_btype
  File "C:\Users\Owner\Projects\PythonProjects\procgenTests\lib\site-packages\cffi\model.py", line 255, in build_backend_type
TypeError: 'NoneType' object is not callable
4

0 回答 0