"Bad file descriptor" after py2exe or Installer

Luc Saffre luc.saffre at gmx.net
Mon Dec 15 10:07:51 EST 2003


On 12.12.2003 15:41, Thomas Heller wrote:

> py2exe seems to pick up cygwin binaries.  The reason could be that
> either you have cygwin extensions somewhere in your pythonpath, or parts
> of the PATH env variable points into the cygwin directories, or
> something like that.  You should look at the output above carefully, and
> make sure that it is what one would expect.

That's it! Thank you, Thomas, your hint helped.

I had the Cygwin tcltk package installed. After removing this package 
(using cygwin's setup.exe), I can use again the original PIL/Image.py 
and everything works fine.

My PATH contains the cygwin bin directories:
PATH=u:\CYGWIN\BIN;
c:\python23\Scripts;c:\python23;
...
u:\CYGWIN\USR\BIN;u:\CYGWIN\USR\LOCAL\BIN;...

Another workaround is to remove the cygwin directories from PATH:
I reinstalled the cygwin tcltk and the problem reappeared,
moving the first cygwin directory to come after the python directory did 
not help. Then I removed those directories completely from PATH (during 
the build) and the problem disappeared again.

I would consider this as a bug (in both py2exe and Installer) since they 
decide to pick some cygwin tcl/tk dll's who happen to hang around while 
the Python runtime won't...

Luc





More information about the Python-list mailing list