HalfAsleepSam
HalfAsleepSam

Reputation: 31

PyOpenGL isnt a package

Trying to run a basic pygame based PyOpenGL window and it returns an error.

I have reinstalled them both from https://www.lfd.uci.edu/~gohlke/pythonlibs/

Code:

import pygame as pg
from OpenGL.GL import *

Error:

ModuleNotFoundError: No module named 'OpenGL.GL'; 'OpenGL' is not a package

Tried running it, expected a window with a blue/grey background. recieved an error in VS Code terminal and anger

Upvotes: 0

Views: 239

Answers (1)

HalfAsleepSam
HalfAsleepSam

Reputation: 31

cgohlke's comment was right, the file I was using was called OpenGL.py changed the name and it worked fine

Upvotes: 1

Related Questions