<quote>
Traceback (most recent call last):
File "ABM15.pyw", line 15, in <module>
File "PyQt4\Qwt5\__init__.pyc", line 32, in <module>
File "PyQt4\Qwt5\Qwt.pyc", line 12, in <module>
File "PyQt4\Qwt5\Qwt.pyc", line 10, in __load
ImportError: No module named QtSvg
If you Google this last line, you'll find that I've posted this to a forum, but
no one answered me. Someone has also had this problem before, although I think
they were using PyInstaller and not py2exe. They say that its because Qwt has a
hidden import for QtSvg. If I can turn this off, maybe it'll work, but I don't
know how.
I have downloaded py2exe and I run the attached setup.py file in my working
directory. It creates two directories: 'dist' and 'build'. An executable is
created in the 'dist' directory along with other things. When I tried running
it, it produces a log file, in which I find the error messages.
<\quote>
Perhaps someone can recognize these symptoms.
Thanks,
Gib
> <quote>
>
> Traceback (most recent call last):
> File "ABM15.pyw", line 15, in <module>
> File "PyQt4\Qwt5\__init__.pyc", line 32, in <module>
> File "PyQt4\Qwt5\Qwt.pyc", line 12, in <module>
> File "PyQt4\Qwt5\Qwt.pyc", line 10, in __load
> ImportError: No module named QtSvg
>
> If you Google this last line, you'll find that I've posted this to a
> forum, but no one answered me. Someone has also had this problem before,
> although I think they were using PyInstaller and not py2exe. They say that
> its because Qwt has a hidden import for QtSvg. If I can turn this off,
> maybe it'll work, but I don't know how.
>
> I have downloaded py2exe and I run the attached setup.py file in my
> working directory. It creates two directories: 'dist' and 'build'. An
> executable is created in the 'dist' directory along with other things.
> When I tried running it, it produces a log file, in which I find the error
> messages.
>
> <\quote>
>
> Perhaps someone can recognize these symptoms.
Someone asked this question on the PyQt mailing list, too:
http://www.riverbankcomputing.com/pipermail/pyqt/2010-February/025827.html
I believe it was also asked on the #pyqt IRC channel on freenode. I think
I have previously referred people with py2exe/PyQt issues to this page on
the PyQt Wiki:
http://www.py2exe.org/index.cgi/Py2exeAndPyQt
If you can somehow convince py2exe to include the QtSvg module (and
presumably the libQtSvg library as well) then perhaps that will solve
this problem.
David
> Someone asked this question on the PyQt mailing list, too:
>
> http://www.riverbankcomputing.com/pipermail/pyqt/2010-February/025827.html
That's my student, Helvin.
>
> I believe it was also asked on the #pyqt IRC channel on freenode. I think
> I have previously referred people with py2exe/PyQt issues to this page on
> the PyQt Wiki:
>
> http://www.py2exe.org/index.cgi/Py2exeAndPyQt
>
> If you can somehow convince py2exe to include the QtSvg module (and
> presumably the libQtSvg library as well) then perhaps that will solve
> this problem.
I just did a quick test myself, and confirmed that this works for sip. I'm not
at all clear what "--includes" arguments might be needed for QtSvg (and
libQtSvg). I'll pass this info on to Helvin.
Gib
> I have previously referred people with py2exe/PyQt issues to this page on
> the PyQt Wiki:
>
> http://www.py2exe.org/index.cgi/Py2exeAndPyQt
>
> If you can somehow convince py2exe to include the QtSvg module (and
> presumably the libQtSvg library as well) then perhaps that will solve
> this problem.
>
> David
Thanks David, that worked a treat. :-)
If you could update the Wiki (or maybe the py2exe Wiki, if they have one)
to say what you did, that would be useful for others in the future. Then
they'll only be one search away from the answer. :-)
David
OK, I'll put it on the to-do list.
Gib