'I get an error when I try to import minerl

I tried to make a AI for minecraft using python's library minerl.

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.



Solution 1:[1]

You have too new gym installed. Run the command:

pip install gym==0.19 and try again.

https://github.com/minerllabs/minerl/issues/620

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jimit Vaghela