I'm trying to install PyOpenGL on my computer:
- Windows 10, 64 bit
- Python 3.7
Apparently, I need to install both PyOpenGL
and PyOpenGL_accelerate
packages.
1. Install PyOpenGL
The command pip install PyOpenGL
works just fine:
C:\Users\Kristof>pip install PyOpenGL
Collecting PyOpenGL
Installing collected packages: PyOpenGL
Successfully installed PyOpenGL-3.1.0
2. Install PyOpenGL_accelerate (FIRST ATTEMPT)
The command pip install PyOpenGL_accelerate
fails:
C:\Python37\PyOpenGL-accelerate-3.1.0>pip install PyOpenGL_accelerate --no-cache-dir
Collecting PyOpenGL_accelerate
Downloading https://files.pythonhosted.org/packages/d9/74/293aa8794f2f236186d19e61c5548160bfe159c996ba01ed9144c89ee8ee/PyOpenGL-accelerate-3.1.0.tar.gz (323kB)
|████████████████████████████████| 327kB 1.3MB/s
Building wheels for collected packages: PyOpenGL-accelerate
Building wheel for PyOpenGL-accelerate (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Kristof\\AppData\\Local\\Temp\\pip-install-w04pgijy\\PyOpenGL-accelerate\\setup.py'"'"'; __file__='"'"'C:\\Users\\Kristof\\AppData\\Local\\Temp\\pip-install-w04pgijy\\PyOpenGL-accelerate\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Kristof\AppData\Local\Temp\pip-wheel-x4gprfbc' --python-tag cp37
cwd: C:\Users\Kristof\AppData\Local\Temp\pip-install-w04pgijy\PyOpenGL-accelerate\
Complete output (48 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\OpenGL_accelerate
copying .\__init__.py -> build\lib.win-amd64-3.7\OpenGL_accelerate
running build_ext
skipping 'src\wrapper.c' Cython extension (up-to-date)
building 'OpenGL_accelerate.wrapper' extension
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\src
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\Kristof\AppData\Local\Temp\pip-install-w04pgijy\PyOpenGL-accelerate\.. -IC:\Users\Kristof\AppData\Local\Temp\pip-install-w04pgijy\PyOpenGL-accelerate\src -IC:\Users\Kristof\AppData\Local\Temp\pip-install-w04pgijy\PyOpenGL-accelerate -Ic:\python37\include -Ic:\python37\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /Tcsrc\wrapper.c /Fobuild\temp.win-amd64-3.7\Release\src\wrapper.obj
wrapper.c
src\wrapper.c(3919): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src\wrapper.c(4376): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src\wrapper.c(11474): error C2039: 'exc_type': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
src\wrapper.c(11475): error C2039: 'exc_value': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
src\wrapper.c(11476): error C2039: 'exc_traceback': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
src\wrapper.c(11488): error C2039: 'exc_type': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
src\wrapper.c(11489): error C2039: 'exc_value': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
src\wrapper.c(11490): error C2039: 'exc_traceback': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
src\wrapper.c(11491): error C2039: 'exc_type': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
src\wrapper.c(11492): error C2039: 'exc_value': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
src\wrapper.c(11493): error C2039: 'exc_traceback': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
src\wrapper.c(11536): error C2039: 'exc_type': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
src\wrapper.c(11537): error C2039: 'exc_value': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
src\wrapper.c(11538): error C2039: 'exc_traceback': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
src\wrapper.c(11539): error C2039: 'exc_type': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
src\wrapper.c(11540): error C2039: 'exc_value': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
src\wrapper.c(11541): error C2039: 'exc_traceback': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
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: Command errored out with exit status 1:
command: 'c:\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Kristof\\AppData\\Local\\Temp\\pip-install-w04pgijy\\PyOpenGL-accelerate\\setup.py'"'"'; __file__='"'"'C:\\Users\\Kristof\\AppData\\Local\\Temp\\pip-install-w04pgijy\\PyOpenGL-accelerate\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Kristof\AppData\Local\Temp\pip-record-1ulnpq1p\install-record.txt' --single-version-externally-managed --compile
cwd: C:\Users\Kristof\AppData\Local\Temp\pip-install-w04pgijy\PyOpenGL-accelerate\
Complete output (48 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\OpenGL_accelerate
copying .\__init__.py -> build\lib.win-amd64-3.7\OpenGL_accelerate
running build_ext
skipping 'src\wrapper.c' Cython extension (up-to-date)
building 'OpenGL_accelerate.wrapper' extension
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\src
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\Kristof\AppData\Local\Temp\pip-install-w04pgijy\PyOpenGL-accelerate\.. -IC:\Users\Kristof\AppData\Local\Temp\pip-install-w04pgijy\PyOpenGL-accelerate\src -IC:\Users\Kristof\AppData\Local\Temp\pip-install-w04pgijy\PyOpenGL-accelerate -Ic:\python37\include -Ic:\python37\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /Tcsrc\wrapper.c /Fobuild\temp.win-amd64-3.7\Release\src\wrapper.obj
wrapper.c
src\wrapper.c(3919): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src\wrapper.c(4376): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src\wrapper.c(11474): error C2039: 'exc_type': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
src\wrapper.c(11475): error C2039: 'exc_value': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
src\wrapper.c(11476): error C2039: 'exc_traceback': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
src\wrapper.c(11488): error C2039: 'exc_type': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
src\wrapper.c(11489): error C2039: 'exc_value': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
src\wrapper.c(11490): error C2039: 'exc_traceback': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
src\wrapper.c(11491): error C2039: 'exc_type': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
src\wrapper.c(11492): error C2039: 'exc_value': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
src\wrapper.c(11493): error C2039: 'exc_traceback': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
src\wrapper.c(11536): error C2039: 'exc_type': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
src\wrapper.c(11537): error C2039: 'exc_value': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
src\wrapper.c(11538): error C2039: 'exc_traceback': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
src\wrapper.c(11539): error C2039: 'exc_type': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
src\wrapper.c(11540): error C2039: 'exc_value': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
src\wrapper.c(11541): error C2039: 'exc_traceback': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Kristof\\AppData\\Local\\Temp\\pip-install-w04pgijy\\PyOpenGL-accelerate\\setup.py'"'"'; __file__='"'"'C:\\Users\\Kristof\\AppData\\Local\\Temp\\pip-install-w04pgijy\\PyOpenGL-accelerate\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Kristof\AppData\Local\Temp\pip-record-1ulnpq1p\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
3. Install PyOpenGL_accelerate (SECOND ATTEMPT)
I download a pre-built package for Windows 64-bit:
https://pypi.org/project/PyOpenGL-accelerate/#files
There is no file for Python 3.7, so I take the latest one, which is for Python 3.4:
PyOpenGL-accelerate-3.1.0.win-amd64-py3.4.exe
Unfortunately the installation procedure stops with an error message: Cannot find Python 3.4 installation.
4. Install PyOpenGL_accelerate (THIRD ATTEMPT)
I go back to the same download page:
https://pypi.org/project/PyOpenGL-accelerate/#files
And I download the source code:
PyOpenGL-accelerate-3.1.0.zip (340.0 kB)
Next I open a Windows terminal, navigate to the unzipped folder and run setup.py
(Note: my Python 3.7 installation is located in C:\Python37\
and I unzipped the folder in C:\Python37\PyOpenGL-accelerate-3.1.0
):
C:\Users\Kristof>cd C:\Python37\PyOpenGL-accelerate-3.1.0
C:\Python37\PyOpenGL-accelerate-3.1.0>python setup.py install
running install
running bdist_egg
running egg_info
writing PyOpenGL_accelerate.egg-info\PKG-INFO
writing dependency_links to PyOpenGL_accelerate.egg-info\dependency_links.txt
writing top-level names to PyOpenGL_accelerate.egg-info\top_level.txt
reading manifest file 'PyOpenGL_accelerate.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'PyOpenGL_accelerate.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\OpenGL_accelerate
copying .\__init__.py -> build\lib.win-amd64-3.7\OpenGL_accelerate
running build_ext
skipping 'src\wrapper.c' Cython extension (up-to-date)
building 'OpenGL_accelerate.wrapper' extension
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\src
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Python37\PyOpenGL-accelerate-3.1.0\.. -IC:\Python37\PyOpenGL-accelerate-3.1.0\src -IC:\Python37\PyOpenGL-accelerate-3.1.0 -IC:\Python37\include -IC:\Python37\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /Tcsrc\wrapper.c /Fobuild\temp.win-amd64-3.7\Release\src\wrapper.obj
wrapper.c
src\wrapper.c(3919): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src\wrapper.c(4376): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src\wrapper.c(11474): error C2039: 'exc_type': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
src\wrapper.c(11475): error C2039: 'exc_value': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
src\wrapper.c(11476): error C2039: 'exc_traceback': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
src\wrapper.c(11488): error C2039: 'exc_type': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
src\wrapper.c(11489): error C2039: 'exc_value': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
src\wrapper.c(11490): error C2039: 'exc_traceback': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
src\wrapper.c(11491): error C2039: 'exc_type': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
src\wrapper.c(11492): error C2039: 'exc_value': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
src\wrapper.c(11493): error C2039: 'exc_traceback': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
src\wrapper.c(11536): error C2039: 'exc_type': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
src\wrapper.c(11537): error C2039: 'exc_value': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
src\wrapper.c(11538): error C2039: 'exc_traceback': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
src\wrapper.c(11539): error C2039: 'exc_type': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
src\wrapper.c(11540): error C2039: 'exc_value': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
src\wrapper.c(11541): error C2039: 'exc_traceback': is not a member of '_ts'
c:\python37\include\pystate.h(209): note: see declaration of '_ts'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
5. My questions
I'm really stuck now. Please help:
Is
PyOpenGL
abandoned?
The latest pre-built executable dates back to the Python 3.4 era. That's more than 5 years ago. Why isn't there another update in so many years?How do I get
PyOpenGL_accelerate
installed?
I've tried three different ways to install this thing. Can you help?