Steve, see this post: http://preview.tinyurl.com/36epdr2
On Aug 11, 5:36 pm, Terry Brown <[email protected]> wrote: > On Wed, 11 Aug 2010 15:51:52 -0700 (PDT) > > > > Steve Allen <[email protected]> wrote: > > Hmmmm, I get module not found?! > > C:\Python26\Lib\site-packages\PyQt4>c:\Python26\python > > Python 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit > > (Intel)] on win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from PyQt import QtGui > > Traceback (most recent call last): > > File "<stdin>", line 1, in <module> > > ImportError: No module named PyQt > > > I wonder if it has something to do with a previous installation of > > Python25, and that there's something in the Windows registry or > > something that needs to point to the Python26 version? > > I don't know. You said you installed PyQt-Py2.6-gpl-4.7.4-1.exe which > presumably would only install itself into the Python26 environment. And you > seem to be explicitly pathing to c:\Python26\python, so no problem there. > > In your example above you were running python from > C:\Python26\Lib\site-packages\PyQt4, but I'm not 100% sure that means it > would actually look in that dir for the module, to be 100% sure do > > import sys > sys.path.append("C:\\Python26\\Lib\\site-packages\\PyQt4") > from PyQt import QtGui > > ...but if qt had installed properly you wouldn't need that. > > ...gah - just noticed you have > > from PyQt import QtGui > > ...should be... > > from PyQt4 import QtGui > > ...try that > > Cheers -Terry > > > On Aug 11, 5:39 pm, Terry Brown <[email protected]> wrote: > > > On Wed, 11 Aug 2010 13:52:07 -0700 (PDT) > > > > Steve Allen <[email protected]> wrote: > > > > But when I look in the site-packages directory, PyQt4 is there: > > > > What happens when you just run python and enter > > > > from PyQt4 import QtGui > > > > ? > > > > I get: > > > > MNOdonata> python > > > Python 2.6.4 (r264:75706, Dec 7 2009, 18:45:15) > > > [GCC 4.4.1] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > > >>> from PyQt4 import QtGui > > > > i.e. nothing, which is correct. Do you also get nothing? > > > > Cheers -Terry -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.
