[PyQt] Compiling PyQt on Windows with Mingw

Theuns Heydenrych theunsheydenrych at gmail.com
Mon Mar 11 18:01:51 GMT 2013


HI
I get Sip and PyQt compiled successfully and get both installed.
I am using Python 2.7

When executing
*>>> from PyQt4.Qt import **

It just fails, i cant figure out what is going wrong where.
I tried  python -v to get more info, so here is what i get.

*C:\Python27>python -v*
*# installing zipimport hook*
*import zipimport # builtin*
*# installed zipimport hook*
*# C:\Python27\lib\site.pyc matches C:\Python27\lib\site.py*
*import site # precompiled from C:\Python27\lib\site.pyc*
*# C:\Python27\lib\os.pyc matches C:\Python27\lib\os.py*
*import os # precompiled from C:\Python27\lib\os.pyc*
*import errno # builtin*
*import nt # builtin*
*# C:\Python27\lib\ntpath.pyc matches C:\Python27\lib\ntpath.py*
*import ntpath # precompiled from C:\Python27\lib\ntpath.pyc*
*# C:\Python27\lib\stat.pyc matches C:\Python27\lib\stat.py*
*import stat # precompiled from C:\Python27\lib\stat.pyc*
*# C:\Python27\lib\genericpath.pyc matches C:\Python27\lib\genericpath.py*
*import genericpath # precompiled from C:\Python27\lib\genericpath.pyc*
*# C:\Python27\lib\warnings.pyc matches C:\Python27\lib\warnings.py*
*import warnings # precompiled from C:\Python27\lib\warnings.pyc*
*# C:\Python27\lib\linecache.pyc matches C:\Python27\lib\linecache.py*
*import linecache # precompiled from C:\Python27\lib\linecache.pyc*
*# C:\Python27\lib\types.pyc matches C:\Python27\lib\types.py*
*import types # precompiled from C:\Python27\lib\types.pyc*
*# C:\Python27\lib\UserDict.pyc matches C:\Python27\lib\UserDict.py*
*import UserDict # precompiled from C:\Python27\lib\UserDict.pyc*
*# C:\Python27\lib\_abcoll.pyc matches C:\Python27\lib\_abcoll.py*
*import _abcoll # precompiled from C:\Python27\lib\_abcoll.pyc*
*# C:\Python27\lib\abc.pyc matches C:\Python27\lib\abc.py*
*import abc # precompiled from C:\Python27\lib\abc.pyc*
*# C:\Python27\lib\_weakrefset.pyc matches C:\Python27\lib\_weakrefset.py*
*import _weakrefset # precompiled from C:\Python27\lib\_weakrefset.pyc*
*import _weakref # builtin*
*# C:\Python27\lib\copy_reg.pyc matches C:\Python27\lib\copy_reg.py*
*import copy_reg # precompiled from C:\Python27\lib\copy_reg.pyc*
*# C:\Python27\lib\traceback.pyc matches C:\Python27\lib\traceback.py*
*import traceback # precompiled from C:\Python27\lib\traceback.pyc*
*# C:\Python27\lib\sysconfig.pyc matches C:\Python27\lib\sysconfig.py*
*import sysconfig # precompiled from C:\Python27\lib\sysconfig.pyc*
*# C:\Python27\lib\re.pyc matches C:\Python27\lib\re.py*
*import re # precompiled from C:\Python27\lib\re.pyc*
*# C:\Python27\lib\sre_compile.pyc matches C:\Python27\lib\sre_compile.py*
*import sre_compile # precompiled from C:\Python27\lib\sre_compile.pyc*
*import _sre # builtin*
*# C:\Python27\lib\sre_parse.pyc matches C:\Python27\lib\sre_parse.py*
*import sre_parse # precompiled from C:\Python27\lib\sre_parse.pyc*
*# C:\Python27\lib\sre_constants.pyc matches
C:\Python27\lib\sre_constants.py*
*import sre_constants # precompiled from C:\Python27\lib\sre_constants.pyc*
*# C:\Python27\lib\locale.pyc matches C:\Python27\lib\locale.py*
*import locale # precompiled from C:\Python27\lib\locale.pyc*
*import encodings # directory C:\Python27\lib\encodings*
*# C:\Python27\lib\encodings\__init__.pyc matches
C:\Python27\lib\encodings\__init__.py*
*import encodings # precompiled from C:\Python27\lib\encodings\__init__.pyc*
*# C:\Python27\lib\codecs.pyc matches C:\Python27\lib\codecs.py*
*import codecs # precompiled from C:\Python27\lib\codecs.pyc*
*import _codecs # builtin*
*# C:\Python27\lib\encodings\aliases.pyc matches
C:\Python27\lib\encodings\aliases.py*
*import encodings.aliases # precompiled from
C:\Python27\lib\encodings\aliases.pyc*
*import operator # builtin*
*# C:\Python27\lib\functools.pyc matches C:\Python27\lib\functools.py*
*import functools # precompiled from C:\Python27\lib\functools.pyc*
*import _functools # builtin*
*import _locale # builtin*
*# C:\Python27\lib\encodings\cp1252.pyc matches
C:\Python27\lib\encodings\cp1252.py*
*import encodings.cp1252 # precompiled from
C:\Python27\lib\encodings\cp1252.pyc*
*Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)]
on win32*
*Type "help", "copyright", "credits" or "license" for more information.*
*
*
*>>> from PyQt4.Qt import **
*# C:\Python27\lib\encodings\cp437.pyc matches
C:\Python27\lib\encodings\cp437.py*
*import encodings.cp437 # precompiled from
C:\Python27\lib\encodings\cp437.pyc*
*import PyQt4 # directory C:\Python27\lib\site-packages\PyQt4*
*# C:\Python27\lib\site-packages\PyQt4\__init__.pyc matches
C:\Python27\lib\site-packages\PyQt4\__init__.py*
*import PyQt4 # precompiled from
C:\Python27\lib\site-packages\PyQt4\__init__.pyc*
*# C:\Python27\lib\atexit.pyc matches C:\Python27\lib\atexit.py*
*import atexit # precompiled from C:\Python27\lib\atexit.pyc*
*import sip # dynamically loaded from C:\Python27\lib\site-packages\sip.pyd*

I had a look at the C:\Python27\Lib\site-packages\PyQt4\__init__.py, and it
looks like there is nothing in the file, is this correct?
Here is the contents of the __init__.py file

*# Copyright (c) 2012 Riverbank Computing Limited <
info at riverbankcomputing.com>*
*# *
*# This file is part of PyQt.*
*# *
*# This file may be used under the terms of the GNU General Public*
*# License versions 2.0 or 3.0 as published by the Free Software*
*# Foundation and appearing in the files LICENSE.GPL2 and LICENSE.GPL3*
*# included in the packaging of this file.  Alternatively you may (at*
*# your option) use any later version of the GNU General Public*
*# License if such license has been publicly approved by Riverbank*
*# Computing Limited (or its successors, if any) and the KDE Free Qt*
*# Foundation. In addition, as a special exception, Riverbank gives you*
*# certain additional rights. These rights are described in the Riverbank*
*# GPL Exception version 1.1, which can be found in the file*
*# GPL_EXCEPTION.txt in this package.*
*# *
*# If you are unsure which license is appropriate for your use, please*
*# contact the sales department at sales at riverbankcomputing.com.*
*# *
*# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE*
*# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*

Please help, i dont know where what is going wrong.
Is there somebody out there that does compile Sip and PyQt with Mingw on
Win7?

Regards
Theuns Heydenrych
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20130311/b5f636fe/attachment.html>


More information about the PyQt mailing list