我一直在玩SIMPLE项目(
https://medium.com/applied-data-science/how-to-train-ai-agents-to-play-multiplayer-games-using-self-play-deep-reinforcement-learning-247d0b440717
)试图更好地理解将ML用于多玩家游戏。这个项目已经有几年的历史了,所以我决定尝试将依赖项更新到新版本。我的requirements.txt现在如下所示:
pytorch==2.0.1
pytorch-cuda==11.8
tensorflow==2.10.0
stable-baselines3==1.5.0
jupyter==1.0.0
jupyterlab==4.0.2
pillow
mpi4py==3.1.4
我使用conda创建了一个python 3.10环境,并安装了依赖项。所有的东西都安装好了,pycharm中没有标记错误,所以我继续运行train.py。运行立即崩溃,并出现错误:
C:\workspace\SIMPLE\app\train.py -r -e sushigo
Traceback (most recent call last):
File "C:\workspace\SIMPLE\app\train.py", line 6, in <module>
import tensorflow as tf
File "E:\anaconda3\envs\SIMPLE\lib\site-packages\tensorflow\__init__.py", line 37, in <module>
from tensorflow.python.tools import module_util as _module_util
File "E:\anaconda3\envs\SIMPLE\lib\site-packages\tensorflow\python\__init__.py", line 24, in <module>
import ctypes
File "E:\anaconda3\envs\SIMPLE\lib\ctypes\__init__.py", line 8, in <module>
from _ctypes import Union, Structure, Array
ImportError: DLL load failed while importing _ctypes: The specified module could not be found.
我尝试过库的干净安装。我试着完全卸载anaconda并从头开始。我尝试只安装前4个库,以消除潜在的冲突。不管怎样,我总是会犯同样的错误。我不知道在这一点上还能做什么。是什么原因导致了这种情况?我该如何解决?
系统信息
:
Windows 10(64位)
Python 3.10.8
conda 23.5.0
PyCharm 2023.1.3(社区版)