PyOpenGL setup on Python 3

PyOpenGL setup

It was a little difficult. There was a trap that pip install pretended to be normal and didn't actually work.

Environment etc.

Work time May 2020 Win10 Python3.8

1 "Get it with pip and install it" was useless

First I tried using python.exe -m pip install pyopengl. -Installation completed normally. -Sample program execution (PyODE "Tutorial 3".) → Error when referring to glut.

glut reference error


PS C:\********> C:\Python380\python.exe .\tutorial3.py
Traceback (most recent call last):
  File ".\tutorial3.py", line 177, in <module>
    glutInit()
  File "C:\Python380\lib\site-packages\OpenGL\GLUT\special.py", line 333, in glutInit
    _base_glutInit( ctypes.byref(count), holder )
  File "C:\Python380\lib\site-packages\OpenGL\platform\baseplatform.py", line 423, in __call__
    raise error.NullFunctionError(
OpenGL.error.NullFunctionError: Attempt to call an undefined function glutInit, check for bool(glutInit) before calling

I tried adding freeglut, but there was no change in symptoms (freeglut was unnecessary after all)

After all, I gave up this method and deleted it with pip uninstall pyopengl.

2 Get WHL and install again

This site was helpful ↓ http://blawat2015.no-ip.com/~mieki256/diary/201506185.html As described ・ Https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyopengl Obtained "PyOpenGL-3.1.5-cp38-cp38-win_amd64.whl" from. -Install WHL with the pip command     → The sample program was executed normally.

By the way, it seems that "PyOpenGL_accelerate" is also included with pyopengl, but I have not installed it yet.

Recommended Posts

PyOpenGL setup on Python 3
Python on Windows
twitter on python3
python on mac
Python on Windbg
Python conda on cygwin
Install Python on Pidora.
Install Scrapy on python3
Install Python on Mac
Install Python 3 on Mac
Install Python3.4 on CentOS 6.6
Installing pandas on python2.6
python basic on windows ②
Install python on windows
Install Python 2.7.3 on CentOS 5.4
build Python on Ubuntu
Install Python 3.3 on Ubuntu 12.04
Install Python 3.4 on Mac
Install Python 3.6 on Docker
Torque setup on CentOS 6
Set-enable Python virtualenv on Windows
Set up Python 3.4 on Ubuntu
Run Openpose on Python (Windows)
Use matplotlib on Ubuntu 12 & Python
Install watchdog on Windows + Python 3.3
Python on Ruby and angry Ruby on Python
Install pygame on python3.4 on mac
Python + Kivy development on Windows
Install Python 3.8 on CentOS 7 (SCL)
Real-time graphs on Plotly (Python)
Made python available on macOS
Sphinx-autobuild (0.5.2) on Windows7, Python 3.5.1, Sphinx 1.3.5
Put Python 3.x on Ubuntu
Fastest Python installation on Windows
[Python] Notes on data analysis
Build Python environment on Windows
Run Tensorflow 2.x on Python 3.7
Handling of python on mac
Update python on Mac to 3.7-> 3.8
Install pandas 0.14 on python3.4 [on Mac]
Install OpenCV on Ubuntu + python
Notes on installing Python on Mac
Run Python CGI on CORESERVER
Twitter posts on Python 3 etc.
Run unix command on python
Build python environment on windows
Python --Install MySQLDB on EC2
Introducing TensorFlow on Ubuntu + Python 2.7
Install Python 3.8 on CentOS 8 (AppStream)
I ran python on windows
Broadcast on LINE using python
[Python] [Chainer] [Windows] Install Chainer on Windows
Use Python on Windows (PyCharm)
Notes on installing Python on CentOS
docker build python based on alpine
Building a Python environment on Mac
Install Python Pillow on Amazon Linux
Install Python 3.8 on Ubuntu 18.04 (OS standard)
Looking back on Python 2020 around me
If python on mac goes missing
Python 3.4 pyvenv fails on Ubuntu 14.04 LTS