You can do this using Cygwin Ports, a bunch of programs that have been ported to Cygwin, but aren't ready for general release.
From that page:
- Use the latest Cygwin setup.exe (at least version 2.738).
Launch setup.exe with the -K flag, e.g.:
cygstart -- /path/to/setup.exe -K http://cygwinports.org/ports.gpg
On Choose Installation Type page, select "Install from Internet".
- On Choose Download Site(s) page, select a distro mirror, then enter ftp://ftp.cygwinports.org/pub/cygwinports in the User URL field and press Add (making sure that both are highlighted).
- Mirrors are available by instead entering http://downloads.sourceforge.net/cygwin-ports as the User URL.
- Alternatively, you can use a sourceware mirror, but if you do, you must use one hosted on a different server than your selected distro mirror.
- Proceed with package selection and installation, making sure to install any indicated dependencies.
Note that the two links provided didn't work for me; I'd expect FTP not to work as it's restricted by my firewall, but I think the alternative Sourceforge link is duff, and should be http://sourceforge.net/projects/cygwin-ports/files/. Using that URL worked fine for me.
From there, you should be able to select to install the python3 package. It's currently giving version 3.1.5rc1-1.
It does install as python3
, leaving my existing python install as v2.6.8:
$ python -V
Python 2.6.8
$ python3 -V
Python 3.1.5rc1
$ ls -l $(which python) $(which python3)
lrwxrwxrwx 1 me root 13 Jun 12 13:43 /usr/bin/python -> python2.6.exe
lrwxrwxrwx 1 me Domain Users 13 Jun 19 10:51 /usr/bin/python3 -> python3.1.exe