"Bad file descriptor" after py2exe or Installer

Thomas Heller theller at python.net
Wed Dec 17 15:29:06 EST 2003


Luc Saffre <luc.saffre at gmx.net> writes:

> 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...

Yep, that's a bug.

Although I wonder: does it really make sense to include cygwin's path
into PATH?  Isn't cygwin only usefull from within the cygwin prompt?

I tried cygwin some time ago, and was initially broken because I had
installed (native) mingw32 somewhere, so it seemed to me to better keep
cmd.exe and cygwin's paths separate from each other.

Thomas




More information about the Python-list mailing list