Hi,
I am trying to run the code on Google Colab but getting this error while using gym.make() for minerl environment
BUILD FAILED
Total time: 1 mins 0.464 secs
Minecraft process finished unexpectedly. There was an error with Malmo.
Regards
Hi,
I am trying to run the code on Google Colab but getting this error while using gym.make() for minerl environment
BUILD FAILED
Total time: 1 mins 0.464 secs
Minecraft process finished unexpectedly. There was an error with Malmo.
Regards
I am not sure if MineRL runs on Colab, since you need some specific versions of libraries and Java specifically. See docs on installation.
Working Colab example (credit to @tviskaron):
!java -version
!sudo apt-get purge openjdk-*
!java -version
!sudo apt-get install openjdk-8-jdk
!pip3 install --upgrade minerl
!sudo apt-get install xvfb xserver-xephyr vnc4server
!sudo pip install pyvirtualdisplay
from pyvirtualdisplay import Display
display = Display(visible=0, size=(640, 480))
display.start()import minerl
import gym
env = gym.make(‘MineRLNavigateDense-v0’)obs = env.reset()
done = False
net_reward = 0for _ in range(100):
action = env.action_space.noop()action['camera'] = [0, 0.03*obs["compassAngle"]] action['back'] = 0 action['forward'] = 1 action['jump'] = 1 action['attack'] = 1 obs, reward, done, info = env.step( action) net_reward += reward print("Total reward: ", net_reward)
env.close()