[Insight-users] ITK problem with py2exe

Mathieu Malaterre mathieu.malaterre at gmail.com
Wed Jul 15 03:24:17 EDT 2009


On Mon, Jul 13, 2009 at 6:27 PM, Paulo Henrique Junqueira
Amorim<paulojamorim at gmail.com> wrote:
> Hi All,
>
> My application is written in Python and uses the ITK 3.14
> I am creating the executable with py2exe it.
> The wrapper was created with the option WRAP_ITK_PYTHON
> When I click the executable of my application the following error occurs.
>
> Traceback (most recent call last):
>   File "invesalius.py", line 28, in <module>
>   File "control.pyc", line 10, in <module>
>   File "reader\analyze_reader.pyc", line 3, in <module>
>   File "itk.pyc", line 2, in <module>
>   File "itkBase.pyc", line 228, in <module>
> WindowsError: [Error 3] O sistema não pode encontrar o caminho especificado:
> 'E:\\_\\files\\dist\\app.exe\\Configuration/*.*'
>
> How can I fix this?

You need to read the py2exe documentation esp. the 'frozen' part. See
gdcm for example, it uses a variable to detect 'frozen' configuration:

http://gdcm.svn.sf.net/viewvc/gdcm/trunk/Wrapping/Python/gdcm.py?view=markup

...
def main_is_frozen():
  return hasattr(sys, "frozen")
...

2cts
-- 
Mathieu


More information about the Insight-users mailing list