I keep receiving Error: pygame.error: No available video device
.
This works on python default IDLE that comes when installing python 3.10 on Windows but doesn't work with Replit(Online IDLE).
I installed pygame into Relpit as you can see here
I'm getting Error from this part of the code:
import pygame
import math
pygame.init()
WIDTH, HEIGHT = 800, 800
WIN = pygame.display.set_mode((WIDTH, HEIGHT)) <<<-- ERROR LINE
pygame.display.set_caption("Planet Simulation")
This is the the Output:
pygame 2.1.2 (SDL 2.0.16, Python 3.8.12)
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
File "main.py", line 6, in <module>
WIN = pygame.display.set_mode((WIDTH, HEIGHT))
pygame.error: No available video device
So my question is, Is this the IDLE fault or is the code wrong. Also How do I fix it?