在 Win7 64 位環境下使用 Python + PyOpenGL,呼叫 glutInit() 即報錯:
_base_glutInit(ctypes.byref(count), holder)
TypeError: 'NoneType' object is not callable
網路上常見建議將 glut32.dll 放入 C:\Windows\System32,但在 64 位系統中這是錯誤的。
glut32.dll(PyOpenGL 通常為 32 位綁定)。C:\Windows\SysWOW64(而非 System32)。同理,其他 32 位依賴庫 (如 freeglut.dll) 亦需放入 SysWOW64。避開此坑,PyOpenGL 開發即刻順暢。