Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PyOpenGL is not work
#6
When Python executes this in your program:
import OpenGL.GL
It searches the python path for "OpenGL.py". This should be found in a folder that was added to your "python311/Lib/site-packages" (or whatever version of Python or whatever virtual environment you are using) folder when you ran pip install. But before it looks in "python311/Lib/site-packages" in looks for the OpenGL.py in the current working directory, usually the same directory as the program you are running. If it finds the file there, it imports that file, not the package you installed using pip.

If you want to use OpenGL, you should not create any files named OpenGL.py. You can use "Open_GL.py" or "opengl_test.py" or any name that does not match the name of modules you import in your program.
Reply


Messages In This Thread
PyOpenGL is not work - by PoseidonLin - Jul-11-2023, 06:14 AM
RE: PyOpenGL is not work - by Axel_Erfurt - Jul-11-2023, 11:37 AM
RE: PyOpenGL is not work - by PoseidonLin - Jul-12-2023, 12:02 AM
RE: PyOpenGL is not work - by deanhystad - Jul-12-2023, 03:06 AM
RE: PyOpenGL is not work - by PoseidonLin - Jul-12-2023, 04:24 AM
RE: PyOpenGL is not work - by deanhystad - Jul-12-2023, 02:51 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  full pyopengl tutorial ? hsunteik 5 15,577 Mar-21-2017, 07:05 AM
Last Post: hsunteik

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020