Python – Best way to have full Python install under cygwin/XP

cygwinpythonwindows-xp

Pythons installed under WinXP have dirs like DLLs, DOC, include, etc. but python (2.5) installed with cygwin is a bare python.exe. My motivation for asking is that 'things' under XP don't seem to be finding 'other things' under cygwin and vice versa, I want to start developing with Qt, I like shells, and I do not like MS; I thought if I got all the components under one roof, I could finally start to have scripts find executables which could find files and such. 1. Can I simply copy the contents of an XP installation into the cygwin tree? 2. Is the XP flavor of Python different from the cygwin flavor? (Same CPU, he pointed out, naively.) 3. Someone must work with a full-fledged (if snakes had feathers…) Python from within cygwin; how is it done?

Disclaimer 1: I have never compiled anything under XP or cygwin; had hoped not to have to go there, hence, python in the first place. Disclaimer 2: Asked this over at StackOverflow but got a strong hint to ask it here, so here I am.

Responding to this comment: Can you be more specific about "things" finding "other things"? Error messages, for example. Also, what method did you use to install Python under Cygwin? And have you considered installing Linux in a virtual machine with XP as the host? – Dennis Williamson

Error msgs: I expect that it all can be traced to the settings of environment variables like $PATH. When I write a Python script that opens files named on the command line, I have gotten errors saying "file not found"; this goes away if I copy the script into the working dir. I may be on the way to curing this by using os.path.abspath() to introduce the full, ugly filename into the script. Another form of "not finding" I have seen is cygwin not locating the Python installation I wish to use, whether one of the Pythons installed on C: (my system partition) or in cygwin's /usr/bin, which is also /cygdrive/d/cygwin/usr/bin (where D:, aka /cygdrive/d is my user partition). I can't cite the error exactly: didn't write the errmsg down, foolishly.

Method of installing Python under cygwin: Updated the cygwin distribution by using their install; selected their version of Python (happens to be a 2.5) when the opportunity arose.

WinXP –> VM, e.g. Virtual Box from Sun –> a Linux –> full Python installation (all the subdirs, etc.): These are new to me and am just reading up on them. Big question I have is whether the host and virtual OSes share access to certain (all?) filesystems. Having a Linux sandbox bounded by impenetrable walls does not sound terribly useful.

Best Answer

Copying your Python install into Cygwin won't work.

Python Extensions for Windows seems to be what you are after.

Otherwise, I would look at ActivePython (www.activestate.com/activepython/)* if you want to stay on Windows.

*Sorry, it will only let me put 1 link...