problem with import qt in python
I want to use qt with python. "import qt" return me :"ImportError: No module named qt". I already instaled pyqt.
what I 开发者_如何学运维hve to install in order to activate "import qt"
Thank You
The current PyQt comes in the PyQt4
package, which has several modules. You almost always need to start with:
from PyQt4 import QtCore
from PyQt4 import QtGui
Add other imports as necessary if you need additional sub-modules of PyQt (like QtNetwork
, QtSql
etc).
Tip for the future: find the lib/site-packages
library of your Python installation and look at the packages in there if you're not sure about the name after installing.
Also, arm yourself with a PyQt tutorial - any decent one covers this in the first few paragraphs.
import PyQt4
works for me fine.
精彩评论