Just installed QtOpenGL but cannot import it (from Python)

巧了我就是萌 提交于 2019-12-09 02:46:39

问题


I just installed it with apt-get on debian linux with

apt-get install libqt4-opengl

the rest of PyQt4 is available, but I cant get to this new module.

from PyQt4 import QtOpenGL

raises ImportError. any idea what to do?


回答1:


Did you forget to install the Python bindings?

apt-get install python-qt4-gl



回答2:


For Python3, I had to do sudo apt-get install python3-pyqt4.qtopengl



来源:https://stackoverflow.com/questions/1419650/just-installed-qtopengl-but-cannot-import-it-from-python

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!