使用 gym 或者 parl 可能会遇到这个问题:
FileNotFoundError: Could not find module 'x\envs\pp\lib\site-packages\atari_py\ale_interface\ale_c.dll'
(or one of its dependencies). Try using the full path with constructor syntax.
env = gym.make(config['env_name'])
File "x\envs\pp\lib\site-packages\gym\envs\registration.py", line 184, in make
return registry.make(id, **kwargs)
File "x\envs\pp\lib\site-packages\gym\envs\registration.py", line 106, in make
env = spec.make(**kwargs)
File "x\envs\pp\lib\site-packages\gym\envs\registration.py", line 75, in make
cls = load(self.entry_point)
File "x\envs\pp\lib\site-packages\gym\envs\registration.py", line 18, in load
mod = importlib.import_module(mod_name)
File "x\envs\pp\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "" , line 1014, in _gcd_import
File "" , line 991, in _find_and_load
File "" , line 975, in _find_and_load_unlocked
File "" , line 671, in _load_unlocked
File "" , line 843, in exec_module
File "" , line 219, in _call_with_frames_removed
File "x\envs\pp\lib\site-packages\gym\envs\atari\__init__.py", line 1, in <module>
from gym.envs.atari.atari_env import AtariEnv
File "x\envs\pp\lib\site-packages\gym\envs\atari\atari_env.py", line 9, in <module>
import atari_py
File "x\envs\pp\lib\site-packages\atari_py\__init__.py", line 1, in <module>
from .ale_python_interface import *
File "x\envs\pp\lib\site-packages\atari_py\ale_python_interface.py", line 17, in <module>
ale_lib = cdll.LoadLibrary(os.path.join(os.path.dirname(__file__),
File "x\envs\pp\lib\ctypes\__init__.py", line 451, in LoadLibrary
return self._dlltype(name)
File "x\envs\pp\lib\ctypes\__init__.py", line 373, in __init__
self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'x\envs\pp\lib\site-packages\atari_py\ale_interface\ale_c.dll' (or one of its dependencies). Try using the full path with constructor syntax.
以下转载自:
https://stackoverflow.com/questions/63080326/could-not-find-module-atari-py-ale-interface-ale-c-dll-or-one-of-its-dependenc
I was facing the same error. Fortunately, I was able to find one workaround. Follow this steps and you should be good to go.
- Download
ale_c.dll
from here.- Copy it in C:\Users\xxxx\AppData\Local\Programs\Python\Python38\Lib\site-packages\atari_py\ale_interface (Your path can be different).
- 从下边链接下载
ale_c.dll
- 把其放在路径
C:\Users\xxxx\AppData\Local\Programs\Python\Python38\Lib\site-packages\atari_py\ale_interface
之下.
下载地址 (免费的,不需积分):
https://download.csdn.net/download/HaoZiHuang/87393547
放在以下目录 Python38\Lib\site-packages\atari_py\ale_interface
即可