Open ryanedgewurth opened 4 years ago
Okay, I'll likely need more information to hope to track this down, including your precise OS (is this a Windows 10 professional vs home, for instance).
I can see on our continuous integration build that we've loaded and run the test-suite on Windows 64-bit (on Appveyor). So it's likely that we're seeing either an installation or environment-related failure.
You can try running:
PYOPENGL_PLATFORM=nt python3.8 -c "from OpenGL.GLU import *"
which will explicitly tell PyOpenGL to select the NT plugin class for use on your windows system. If that works, then the problem is with detecting the platform. In which case, can you try running the following:
python3.8 -c "import os,sys; print(sys.platform,os.name)"
so we can see if the values we use for detection have changed.
Windows 10 Home 64 Bit Prints "win32 nt" as I'm running the 32 bit version because yes.
I'm running this on the outdated 1607 build because I refuse to upgrade my laptop because of disk space and i am transitioning to a major computer
I have no opinion on particular releases of windows. I don't use the platform.
So what seems to have happened is that we got an import error during the import of the win32 platform plugin. I've added a log call at that point, but I expect the result will simply point at a lower-level failure.
Two debugging tactics here:
python3.8 -c "from OpenGL.platform.win32 import Win32Platform"
should print out the immediate error, most likely. If not, you can install the develop branch from git and we'll log off the failure when you run tests/tests/check_import_err.py
(which just enables logging and does the GLU import).
My guess, at this point, is that we're not finding the OpenGL library itself (i.e. the opengl32
library). The eventual code that tries to do that would look like:
python3.8 -c "from OpenGL.platform import ctypesloader; print(ctypesloader.loadLibrary(ctypesloader.ctypes.windll, 'opengl32'))"
if that succeeds, then we can find the OpenGL library, but for some reason we're seeing an import error, potentially from an import loop or the like.
When I attempt to import the module in Python 3.8, I get this error:
Traceback (most recent call last): File "D:\pygame_test.py", line 3, in <module> from OpenGL.GLU import * File "D:\Python38-32\lib\site-packages\OpenGL\GLU\__init__.py", line 2, in <module> from OpenGL import platform File "D:\Python38-32\lib\site-packages\OpenGL\platform\__init__.py", line 36, in <module> _load() File "D:\Python38-32\lib\site-packages\OpenGL\platform\__init__.py", line 30, in _load plugin = plugin_class() TypeError: 'NoneType' object is not callable
This is my code:import OpenGL import pygame from OpenGL.GLU import * print("Imports successful!") # If you see this printed to the console then installation was successful pygame.init() gameDisplay = pygame.display.set_mode((800,600)) pygame.display.set_caption('Test 101')