Use of py2exe and guidata/guiqwt

377 views
Skip to first unread message

piotr

unread,
Nov 24, 2010, 9:06:11 AM11/24/10
to guidata/guiqwt
Hi,

I would like use py2exe and guidata/guiqwt. I have an error when I run
the .exe.
Here is the log :

Traceback (most recent call last):
File "boite_a_outil.py", line 23, in <module>
File "dirad\fileinout.pyc", line 17, in <module>
File "guiqwt\pyplot.pyc", line 16, in <module>
File "guidata\__init__.pyc", line 539, in <module>
File "guidata\config.pyc", line 19, in <module>
File "guidata\configtools.pyc", line 101, in add_image_module_path
File "guidata\configtools.pyc", line 83, in add_image_path
WindowsError: [Error 3] Le chemin d'accès spécifié est introuvable: 'D:
\\Python\\boite_a_outil\\dist\\guidata\\images/*.*'

I think that I should use guidata.disthelpers, but i don't know how.
Could you help me ?
Thanks.
Piotr

Pierre Raybaut

unread,
Nov 24, 2010, 1:12:16 PM11/24/10
to guidata/guiqwt
Try the following in your setup.py script:

from guidata.disthelpers import create_vs2008_data_files, add_modules
data_files = create_vs2008_data_files()
includes = []
excludes = []
add_modules(['guidata', 'guiqwt'], data_files, includes, excludes)

where the three last arguments are variables in your script that you
will pass to the 'setup' function.

If you're interested, I'll post a complete example.

Cheers,
Pierre

piotr

unread,
Nov 26, 2010, 7:16:40 AM11/26/10
to guidata/guiqwt
Thanks a lot. It works. I have just 2 remarks :
1) I have just changed "includes = []" by includes = ['sip', 'PyQt4',
'PyQt4.QtSvg']
2) create_vs2008_data_files() give me an error(*) but I don't need it.

(*)The error message is :
assembly = ElementTree.fromstring(file(manifest).read())
IOError: [Errno2] No such file or directory
C:\\Python26\\Microsoft.VC90.CRT.manifest

Pierre Raybaut

unread,
Nov 27, 2010, 8:03:55 AM11/27/10
to guidata/guiqwt
On Nov 26, 1:16 pm, piotr <pierre.degavril...@gmail.com> wrote:
> Thanks a lot. It works. I have just 2 remarks :
> 1) I have just changed "includes = []" by includes = ['sip', 'PyQt4',
> 'PyQt4.QtSvg']

That's because I forgot to 'PyQt4' here:
add_modules(['PyQt4', 'guidata', 'guiqwt'], data_files, includes,
excludes)

> 2) create_vs2008_data_files() give me an error(*) but I don't need it.
>
> (*)The error message is :
> assembly = ElementTree.fromstring(file(manifest).read())
> IOError: [Errno2] No such file or directory
> C:\\Python26\\Microsoft.VC90.CRT.manifest

That's not a problem indeed because this error means that you don't
have a Python version based on VS2008, so there is no reason to add
these files to your executable package.

Do not hesitate to post here if you have any other question on guidata
and guiqwt.
BTW, I'm about to release new versions for both libraries: the major
change is a real documentation with examples and API reference for
both of them!

Cheers,
Pierre

Pierre Raybaut

unread,
Nov 29, 2010, 8:27:31 AM11/29/10
to guidata/guiqwt
Here is a complete example of py2exe distribution with guidata/guiqwt:
http://packages.python.org/guiqwt/disthelpers.html

Aurèle Durand

unread,
Aug 23, 2015, 4:13:04 PM8/23/15
to guidata/guiqwt, pierre.de...@gmail.com
Hi,

I've exactly the same problem, however when running the simpledialog example I have the following answer:


Traceback (most recent call last):
  File "setup.py", line 5, in <module>
    from guidata.disthelpers import (remove_build_dist, get_default_excludes,
ImportError: cannot import name remove_build_dist

Indeed there is no remove_build_dist in disthelpers.py. However i'm using the last dishelpers.py file: https://code.google.com/p/guidata/source/browse/guidata/disthelpers.py

Could you provide me any help please ?
Thanks,
Aurèle
Reply all
Reply to author
Forward
0 new messages