[英]I get an error when I try to import minerl
I tried to make a AI for minecraft using python's library minerl.我尝试使用 python 的库 minerl 为我的世界制作一个 AI。
import gym
import minerl
env = gym.make('MineRLObtainDiamond-v0')
But for some reason I get this error:但出于某种原因,我收到此错误:
self.shape = ()
AttributeError: can't set attribute
Can someone tell me why I get an error?有人能告诉我为什么会出错吗?
I run it on the latest python version, python 3.9.7, on Pycharm and I use Windows 10 build 19402.我在最新的 python 版本 python 3.9.7 和 Pycharm 上运行它,我使用 Windows 10 build 19402。
You have too new gym installed.你安装的健身房太新了。 Run the command:
运行命令:
pip install gym==0.19
and try again. pip install gym==0.19
然后重试。
https://github.com/minerllabs/minerl/issues/620 https://github.com/minerllabs/minerl/issues/620
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.