Help compiling python on XP with Cygwin.
July 10, 2005 12:25 AM   RSS feed for this thread Subscribe

Help compiling python on XP with Cygwin.

I have been playing around with python these last weeks, and have run up against the following problem: some modules don't have precompiled binaries for windows. No problem, right? Just use easy_install to download and compile on the fly.
Wrong: I get a "python installation was compiled with Visual Basic 7..... must have to compile" or something to that effect. I don't feel like "finding" the VB kit, installing it etc. It's like 4 Gb.
What I would like is to use my Cygwin to compile python, this way I could use easy_install to compile anything else I need (right?).
I have not been able to find step-by-step instructions on how to do this, and would appreciate it if one of you kind sentients would point me in the right direction, linkwise or with actual instructions.
posted by signal to computers & internet (7 comments total)
Nah, just use the .NET devkit:

http://msdn.microsoft.com/visualc/vctoolkit2003/

I love Cygwin, but Python really likes being pure Win32.

Alternatively, run http://www.cygwin.com/setup.exe and make sure both python and gcc are checked off. Run from the shell provided by Cygwin, of course.
posted by effugas at 1:42 AM on July 10, 2005


As effugas said, you are using the Python from Cygwin setup.exe, not the Win32 Python from python.org.

I've been using Cygwin Python for more than two years. I find it's much easier to configure and deal with than Win32 Python. It's also much slower and doesn't support those win32 extensions as easily.
posted by grouse at 1:48 AM on July 10, 2005


grouse: I’m actually using the Windows binaries and didn’t install the cygwin ones (because I already had the win ones).
So, what do you people recomend: keep thin windows version and download .NET, or install the cygwin version, or both?
Thanks!
posted by signal at 8:42 AM on July 10, 2005


You'll definitely be happier with Win32 Python. As you say, if you have a C code module that's not ported to Win32 Python you'll have a heck of a time building it, but in practice I've found most of the modules I've wanted have been compiled by someone already.

Win32 Python switched from VC6 to VC7 sometime recently, I think with Python 2.4 release. There's been a lot of griping about it on comp.lang.python; if you search hard enough, you'll probably find instructions for how to build it with free tools.
posted by Nelson at 8:44 AM on July 10, 2005


I've been working with Python on win32 for the past few weeks. I've got MinGW and Cygwin setup on my system. One of the problems you might be having is that the Python libraries are in MSVC++ format. See the following page for generating a gcc compatible version:

Creating .a library

If you're using Python 2.4, just replace python22 with python24.

If this works, you probably won't need to recompile Python.
posted by formless at 8:48 AM on July 10, 2005


Based on the problem you have already experienced, I think Cygwin Python will be easier if you value your time. If you don't, then by all means search for Win32 versions of stuff, install Microsoft's tools, or use the workaround provided by formless.

I use both, but usually only Win32 Python when I have to.
posted by grouse at 9:42 AM on July 10, 2005


On Windows I find it much easier to accept the Win32 environment to some extent and change it to my liking, rather than install Cygwin. Use Win32 Python, use tcsh instead of cmd.exe, download an alternate console instead of the default semi-DOS one, and download the set of native Win32 UNIX utils. You'll be much happier than in cygwin.
posted by devilsbrigade at 10:00 AM on July 10, 2005


« Older What are the legal ramificatio...   |   Source for library-style ename... Newer »

You are not logged in, either login or create an account to post comments



Related Questions
Help me pick a web dev language to learn. May 29, 2008
Advice for a beginning programmer May 19, 2008
Help me, I'm a late adopter. May 14, 2008
Help me puzzle-hack with Python! February 28, 2008
Python or Ruby for learning to program? August 31, 2006