Issue
When I am running a DQN script using Pygame on Google Colab it is throwing error -
pygame.error: No available video device
I am trying to run this GitHub repo on Google Colab. pong_neural_network_live
Installed the Pygame using following code-
import os
!git clone https://github.com/ntasfi/PyGame-Learning-Environment.git
os.chdir('PyGame-Learning-Environment')
!pip install -e .
!pip install pygame
os.chdir('/content')
On trying to initialize and run the following code it
import pygame
pygame.init()
pygame.display.list_modes()
I get
error: video system not initialized
PS: I also enabled third party cookies in Google Chrome.
Solution
Colab is run in the cloud. It cannot send display to a window on your computer. So, you cannot use Pygame. Or you need some clever hacking like VNC.
Answered By - korakot
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.