Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS Big Sur, could not load OpenGL library #61

Open
harripj opened this issue Jan 11, 2021 · 2 comments
Open

macOS Big Sur, could not load OpenGL library #61

harripj opened this issue Jan 11, 2021 · 2 comments

Comments

@harripj
Copy link

harripj commented Jan 11, 2021

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!

@match08
Copy link

match08 commented Jan 20, 2021

me too

@lookcat
Copy link

lookcat commented May 9, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants