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

Cant install PyOpenGL-accelerate #94

Closed
forestfish12 opened this issue Feb 22, 2023 · 3 comments
Closed

Cant install PyOpenGL-accelerate #94

forestfish12 opened this issue Feb 22, 2023 · 3 comments

Comments

@forestfish12
Copy link

forestfish12 commented Feb 22, 2023

I'm trying to install on linux. I'm running python 3.11.1. My gcc --version output is: gcc (GCC) 12.2.1 20221121 (Red Hat 12.2.1-4). I have tried installing with pip and by cloning the repo and building from there. Every time it gives the following error report. The issue seems to be with gcc not being able to compile the package properly. I'm not familiar enough with the process to be able to do more troubleshooting. I've installed it on windows and it installs no problem so I'm completely stumped. Any help or fixes would be greatly appreciated.

Collecting PyOpenGL-accelerate
  Using cached PyOpenGL-accelerate-3.1.6.tar.gz (550 kB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: PyOpenGL-accelerate
  Building wheel for PyOpenGL-accelerate (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [20 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-311
      creating build/lib.linux-x86_64-cpython-311/OpenGL_accelerate
      copying OpenGL_accelerate/__init__.py -> build/lib.linux-x86_64-cpython-311/OpenGL_accelerate
      running build_ext
      building 'OpenGL_accelerate.wrapper' extension
      creating build/temp.linux-x86_64-cpython-311
      creating build/temp.linux-x86_64-cpython-311/src
      gcc -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/tmp/pip-install-ztyrtkk8/pyopengl-accelerate_cf6356ad75824ab2a2d5a47dc57a0646/.. -I/tmp/pip-install-ztyrtkk8/pyopengl-accelerate_cf6356ad75824ab2a2d5a47dc57a0646/src -I/tmp/pip-install-ztyrtkk8/pyopengl-accelerate_cf6356ad75824ab2a2d5a47dc57a0646 -I/usr/include/python3.11 -c src/wrapper.c -o build/temp.linux-x86_64-cpython-311/src/wrapper.o
      src/wrapper.c: In function ‘__Pyx_AddTraceback’:
      src/wrapper.c:438:62: error: invalid use of incomplete typedef ‘PyFrameObject’ {aka ‘struct _frame’}
        438 |   #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
            |                                                              ^~
      src/wrapper.c:28232:5: note: in expansion of macro ‘__Pyx_PyFrame_SetLineNumber’
      28232 |     __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
            |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for PyOpenGL-accelerate
  Running setup.py clean for PyOpenGL-accelerate
Failed to build PyOpenGL-accelerate
Installing collected packages: PyOpenGL-accelerate
  Running setup.py install for PyOpenGL-accelerate ... error
  error: subprocess-exited-with-error

  × Running setup.py install for PyOpenGL-accelerate did not run successfully.
  │ exit code: 1
  ╰─> [22 lines of output]
      running install
      /usr/lib/python3.11/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-311
      creating build/lib.linux-x86_64-cpython-311/OpenGL_accelerate
      copying OpenGL_accelerate/__init__.py -> build/lib.linux-x86_64-cpython-311/OpenGL_accelerate
      running build_ext
      building 'OpenGL_accelerate.wrapper' extension
      creating build/temp.linux-x86_64-cpython-311
      creating build/temp.linux-x86_64-cpython-311/src
      gcc -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/tmp/pip-install-ztyrtkk8/pyopengl-accelerate_cf6356ad75824ab2a2d5a47dc57a0646/.. -I/tmp/pip-install-ztyrtkk8/pyopengl-accelerate_cf6356ad75824ab2a2d5a47dc57a0646/src -I/tmp/pip-install-ztyrtkk8/pyopengl-accelerate_cf6356ad75824ab2a2d5a47dc57a0646 -I/usr/include/python3.11 -c src/wrapper.c -o build/temp.linux-x86_64-cpython-311/src/wrapper.o
      src/wrapper.c: In function ‘__Pyx_AddTraceback’:
      src/wrapper.c:438:62: error: invalid use of incomplete typedef ‘PyFrameObject’ {aka ‘struct _frame’}
        438 |   #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
            |                                                              ^~
      src/wrapper.c:28232:5: note: in expansion of macro ‘__Pyx_PyFrame_SetLineNumber’
      28232 |     __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
            |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> PyOpenGL-accelerate

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
@s4m13337
Copy link

I am unable to install on macOS ventura. Here is the huge error message that I get.

pip3 install PyOpenGL-accelerate
Collecting PyOpenGL-accelerate
  Using cached PyOpenGL-accelerate-3.1.6.tar.gz (550 kB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: PyOpenGL-accelerate
  Building wheel for PyOpenGL-accelerate (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [35 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-13-arm64-cpython-311
      creating build/lib.macosx-13-arm64-cpython-311/OpenGL_accelerate
      copying OpenGL_accelerate/__init__.py -> build/lib.macosx-13-arm64-cpython-311/OpenGL_accelerate
      running build_ext
      building 'OpenGL_accelerate.wrapper' extension
      creating build/temp.macosx-13-arm64-cpython-311
      creating build/temp.macosx-13-arm64-cpython-311/src
      clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -I/private/var/folders/gj/2649g2ld5y39gps6m3zv7qvw0000gn/T/pip-install-b5yla2sb/pyopengl-accelerate_e27e5e013b2f4a8ca276bd41f9cdf096/.. -I/private/var/folders/gj/2649g2ld5y39gps6m3zv7qvw0000gn/T/pip-install-b5yla2sb/pyopengl-accelerate_e27e5e013b2f4a8ca276bd41f9cdf096/src -I/private/var/folders/gj/2649g2ld5y39gps6m3zv7qvw0000gn/T/pip-install-b5yla2sb/pyopengl-accelerate_e27e5e013b2f4a8ca276bd41f9cdf096 -I/opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c src/wrapper.c -o build/temp.macosx-13-arm64-cpython-311/src/wrapper.o
      src/wrapper.c:27136:21: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
                          CYTHON_FALLTHROUGH;
                          ^
      src/wrapper.c:284:34: note: expanded from macro 'CYTHON_FALLTHROUGH'
            #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
                                       ^
      src/wrapper.c:27147:21: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
                          CYTHON_FALLTHROUGH;
                          ^
      src/wrapper.c:284:34: note: expanded from macro 'CYTHON_FALLTHROUGH'
            #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
                                       ^
      src/wrapper.c:28232:5: error: incomplete definition of type 'struct _frame'
          __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      src/wrapper.c:438:62: note: expanded from macro '__Pyx_PyFrame_SetLineNumber'
        #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
                                                            ~~~~~~~^
      /opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/include/python3.11/pytypedefs.h:22:16: note: forward declaration of 'struct _frame'
      typedef struct _frame PyFrameObject;
                     ^
      2 warnings and 1 error generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for PyOpenGL-accelerate
  Running setup.py clean for PyOpenGL-accelerate
Failed to build PyOpenGL-accelerate
Installing collected packages: PyOpenGL-accelerate
  Running setup.py install for PyOpenGL-accelerate ... error
  error: subprocess-exited-with-error
  
  × Running setup.py install for PyOpenGL-accelerate did not run successfully.
  │ exit code: 1
  ╰─> [37 lines of output]
      running install
      /opt/homebrew/lib/python3.11/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build/lib.macosx-13-arm64-cpython-311
      creating build/lib.macosx-13-arm64-cpython-311/OpenGL_accelerate
      copying OpenGL_accelerate/__init__.py -> build/lib.macosx-13-arm64-cpython-311/OpenGL_accelerate
      running build_ext
      building 'OpenGL_accelerate.wrapper' extension
      creating build/temp.macosx-13-arm64-cpython-311
      creating build/temp.macosx-13-arm64-cpython-311/src
      clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -I/private/var/folders/gj/2649g2ld5y39gps6m3zv7qvw0000gn/T/pip-install-b5yla2sb/pyopengl-accelerate_e27e5e013b2f4a8ca276bd41f9cdf096/.. -I/private/var/folders/gj/2649g2ld5y39gps6m3zv7qvw0000gn/T/pip-install-b5yla2sb/pyopengl-accelerate_e27e5e013b2f4a8ca276bd41f9cdf096/src -I/private/var/folders/gj/2649g2ld5y39gps6m3zv7qvw0000gn/T/pip-install-b5yla2sb/pyopengl-accelerate_e27e5e013b2f4a8ca276bd41f9cdf096 -I/opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c src/wrapper.c -o build/temp.macosx-13-arm64-cpython-311/src/wrapper.o
      src/wrapper.c:27136:21: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
                          CYTHON_FALLTHROUGH;
                          ^
      src/wrapper.c:284:34: note: expanded from macro 'CYTHON_FALLTHROUGH'
            #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
                                       ^
      src/wrapper.c:27147:21: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
                          CYTHON_FALLTHROUGH;
                          ^
      src/wrapper.c:284:34: note: expanded from macro 'CYTHON_FALLTHROUGH'
            #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
                                       ^
      src/wrapper.c:28232:5: error: incomplete definition of type 'struct _frame'
          __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      src/wrapper.c:438:62: note: expanded from macro '__Pyx_PyFrame_SetLineNumber'
        #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
                                                            ~~~~~~~^
      /opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/include/python3.11/pytypedefs.h:22:16: note: forward declaration of 'struct _frame'
      typedef struct _frame PyFrameObject;
                     ^
      2 warnings and 1 error generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> PyOpenGL-accelerate

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

@EpicWink
Copy link
Contributor

Duplicates #87

The Cython-generated C sources don't support Python 3.11. You can get it to work by installing Cython v3a beforehand

pip install 'cython >= 3.0a11'
pip install pyopengl-accelerate

@mcfletch
Copy link
Owner

mcfletch commented Aug 8, 2023

Wrappers updated in develop, next release should include the updated code.

@mcfletch mcfletch closed this as completed Aug 8, 2023
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

4 participants