facebookresearch/minihack

Cannot run MiniHack with gui

Closed this issue ยท 1 comments

๐Ÿ› Bug

After setting up the environment, I tried to run this command:
python -m minihack.scripts.play_gui --env MiniHack-River-v0
However nothing is displayed (the scripts exits), and some warning are displayed.

To Reproduce

Steps to reproduce the behavior:

  1. Setup environment as described in Readme file
  2. Run scripts here
  3. The last command doesn't function properly.

Warning displayed in terminal window:

/home/ayoub/Desktop/Projects/rl/minihack/minihack/minihack/tiles/window.py:32: MatplotlibDeprecationWarning:
The set_window_title function was deprecated in Matplotlib 3.4 and will be removed two minor releases later. Use manager.set_window_title or GUI-specific methods instead.
self.fig.canvas.set_window_title(title)
/home/ayoub/Desktop/Projects/rl/minihack/minihack/minihack/tiles/window.py:72: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
plt.pause(0.001)
/home/ayoub/Desktop/Projects/rl/minihack/minihack/minihack/tiles/window.py:101: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
plt.show()

Expected behavior

Scripting launching a gui window.

Environment

Collecting environment information...
MiniHack version: 0.1.1+041bfc7
NLE version: 0.7.3
PyTorch version: N/A
Is debug build: N/A
CUDA used to build PyTorch: N/A

OS: Ubuntu 20.04.3 LTS
GCC version: (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
CMake version: version 3.17.2

Python version: 3.9
Is CUDA available: N/A
CUDA runtime version: 10.1.243
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Could not collect

Versions of relevant libraries:
[pip3] numpy==1.21.3
[conda] Could not collect

Additional context

None

Solution 2 here fixed the issue.