I would like to install Python 2.5 on Cygwin. (EDIT: I need Python 2.5 in particular, and I am aware that Cygwin setup offers 2.7 and 3.2. I installed those using the GUI and they appear to be fine.)

Python 2.5 not included with the latest installation of Cygwin 1.7, so I've been trying to install from source. However, I'm getting the following error:

$ make
gcc -c -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes  -I. -I./Include   -DPy_BUILD_CORE -o Modules/config.o Modules/config.c
gcc -c -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes  -I. -I./Include   -DPy_BUILD_CORE -DPYTHONPATH='":plat-cygwin:lib-tk"' \
        -DPREFIX='"/usr/local"' \
        -DEXEC_PREFIX='"/usr/local"' \
        -DVERSION='"2.5"' \
        -DVPATH='""' \
        -o Modules/getpath.o ./Modules/getpath.c
gcc -c -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes  -I. -I./Include   -DPy_BUILD_CORE -DSVNVERSION=\"`LANG=C svnversion .`\" -o Modules/getbuildinfo.o ./Modules/getbuildinfo.c
gcc: directory": No such file or directory
<command-line>:0:12: warning: missing terminating " character
./Modules/getbuildinfo.c: In function ‘_Py_svnversion’:
./Modules/getbuildinfo.c:44:2: error: missing terminating " character
./Modules/getbuildinfo.c:44:2: warning: ‘return’ with no value, in function returning non-void
Makefile:474: recipe for target `Modules/getbuildinfo.o' failed
make: *** [Modules/getbuildinfo.o] Error 1

I am having trouble understanding what the error is in the Makefile. Here are the relevant lines (467-474):

Modules/getbuildinfo.o: $(PARSER_OBJS) \
        $(OBJECT_OBJS) \
        $(PYTHON_OBJS) \
        $(MODULE_OBJS) \
        $(SIGNAL_OBJS) \
        $(MODOBJS) \
    $(CC) -c $(PY_CFLAGS) -DSVNVERSION=\"`LANG=C $(SVNVERSION)`\" -o $@ $(srcdir)/Modules/getbuildinfo.c

I would appreciate it if someone could explain the error and how to fix it.

migrated from stackoverflow.com May 19 '13 at 11:09

This question came from our site for professional and enthusiast programmers.


Cygwin currently offers

Python 2.7.3-1
Python 2.6.8-2

Since you have not said what is wrong with these, I will assume you did not know about them. Having said that, you can install like this

setup -nqP python

or use the GUI.

  • They are working - I need Python 2.5 in particular for another script. It (and the other scripts it depends on) don't give the same results in newer versions of Python. – dd3 May 19 '13 at 7:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy