pyopengl
pyopengl copied to clipboard
macOS Big Sur, could not load OpenGL library
Hi,
I am experiencing a problem on macOS Big Sur (11.1), where I am trying to import pyopengl and the following error occurs when installing through conda (and happens with reinstallation too):
SafetyError: The package for pyopengl located at /opt/anaconda3/pkgs/pyopengl-3.1.5-py_0
appears to be corrupted. The path 'site-packages/OpenGL/platform/ctypesloader.py'
has an incorrect size.
reported size: 3402 bytes
actual size: 3476 bytes
I am running pyopengl 3.1.5 from the conda-forge repository, and this error occurs for me with both Python 3.8 and 3.9.
Any help or tips would be appreciated!
me too
ctypesloader.py
def _loadLibraryWindows(dllType, name, mode):
"""Load a given library for Windows systems
returns the ctypes C-module object
"""
fullName = None
try:
# fullName = util.find_library( name )
# print("fullName:", fullName)
if name == 'OpenGL':
fullName = '/System/Library/Frameworks/OpenGL.framework/OpenGL'
# fullName = '/usr/local/Cellar/glew/2.2.0_1/lib/libGLEW.dylib'
elif name == 'GLUT':
fullName = '/System/Library/Frameworks/GLUT.framework/GLUT'
#
if fullName is not None:
name = fullName
elif os.path.isfile( os.path.join( DLL_DIRECTORY, name + '.dll' )):
name = os.path.join( DLL_DIRECTORY, name + '.dll' )
except Exception as err:
_log.info( '''Failed on util.find_library( %r ): %s''', name, err )
# Should the call fail, we just try to load the base filename...
pass
try:
print("ddlType", name, mode)
return dllType( name, mode )
except Exception as err:
err.args += (name,fullName)
raise
it's ok when you use maocs opengl2.0.
I want to use the opengl3.3, I have no idea.