Python 2.7.x under Cygwin

The current (as of April 2012) version of Python distributed with Cygwin is 2.6.7. If you need version 2.7.x (with x in {1,2,3}), here are patches and instructions.

Truth in advertising

The patched version will fail to compile the following modules. If you need one of these, sorry, you are on your own.
_bsddb             _sqlite3           _tkinter        
bsddb185           linuxaudiodev      nis             
ossaudiodev        spwd               sunaudiodev     

Memory Mapping Errors

If you get an error saying something about fixup_mmaps_after_fork then this likely has to do with Cygwin's memory architecture (having to map POSIX onto Windows). Sometimes this can be fixed by rebasing the system, see the Cygwin Wiki entry at If that doesn't fix it, sorry, you are on your own.

Binary Distribution

If you need only the dll, you can download the 2.7.2 version as a bzip2 compressed file libpython2.7.dll.bz2. After downloading, uncompress it with bzip2 -d and install with permissions 775 under /usr/bin. You may need to rebase your system, see the Cygwin Wiki entry at


1. Download the desired version from Here are the direct links: Python-2.7.1.tar.bz2, Python-2.7.2.tar.bz2, or Python-2.7.3.tar.bz2.

2. Download the matching patch Python-2.7.1-cygwin.patch.bz2, Python-2.7.2-cygwin.patch.bz2, or Python-2.7.3-cygwin.patch.bz2.

3. Unpack the sources, for example for 2.7.2.
tar -jxvf Python-2.7.2.tar.bz2

4. Patch the sources, for example for 2.7.2.
bzcat Python-2.7.2-cygwin.patch.bz2 | patch -p0

5. Configure the build. For example, you may want to install into /usr/local.
cd Python-2.7.2
./configure --prefix=/usr/local

6. Compile the configured sources.

7. Install the compiled build.
make install

Send comments to

[leftarrow] Back to the previous page.

First posted: Sun Apr 29 17:33:15 PDT 2012
Last updated: Tue May 8 10:55:46 PDT 2012