Could not launch the Environment in the Ubuntu Server through vncserver

I install the environment in the Ubuntu server, and the X-server status is inactive. Then I install vncserver in Ubuntu server and I can use MobaXterm (software in Windows) in my PC to connect it and the screen shows normally, like the following picture:

I test with the gym environment, it works fine:

But it failed when I launched the MineRL environment,

Blockquote
Traceback (most recent call last):
File “test.py”, line 23, in
hello_world()
File “test.py”, line 6, in hello_world
env = gym.make(‘MineRLNavigateDense-v0’)
File “/mnt/home/lll/anaconda3/envs/minecraft/lib/python3.6/site-packages/gym/envs/registration.py”, line 156, in make
return registry.make(id, **kwargs)
File “/mnt/home/lll/anaconda3/envs/minecraft/lib/python3.6/site-packages/gym/envs/registration.py”, line 101, in make
env = spec.make(kwargs)
File “/mnt/home/lll/anaconda3/envs/minecraft/lib/python3.6/site-packages/gym/envs/registration.py”, line 73, in make
env = cls(
_kwargs)
File “/mnt/home/lll/anaconda3/envs/minecraft/lib/python3.6/site-packages/minerl/env/core.py”, line 133, in init
self.instance = self._get_new_instance(port)
File “/mnt/home/lll/anaconda3/envs/minecraft/lib/python3.6/site-packages/minerl/env/core.py”, line 155, in _get_new_instance
instance.launch()
File “/mnt/home/lll/anaconda3/envs/minecraft/lib/python3.6/site-packages/minerl/env/malmo.py”, line 466, in launch
_check_for_launch_errors(line)
File “/mnt/home/lll/anaconda3/envs/minecraft/lib/python3.6/site-packages/minerl/env/malmo.py”, line 753, in _check_for_launch_errors
"ERROR! MineRL could not detect an X Server, Monitor, or Virtual Monitor! "
RuntimeError: ERROR! MineRL could not detect an X Server, Monitor, or Virtual Monitor!
In order to run minerl environments WITHOUT A HEAD use a software renderer such as ‘xvfb’:
xvfb-run python3 <your_script.py>
! NOTE: xvfb conflicts with NVIDIA-drivers!
! To run headless MineRL on a system with NVIDIA-drivers, please start a
! vnc server of your choosing and then `export DISPLAY=:<insert ur vnc server #>
If you’re receiving this error and there is a monitor attached, make sure your current displayvariable is set correctly:
DISPLAY=:0 python3 <your_script.py>
! NOTE: For this to work your account must be logged on the physical monitor.
If none of these steps work, please complain in the discord!
If all else fails, JUST PUT THIS IN A DOCKER CONTAINER! :slight_smile: