How does one install Python3 on cygwin? I tried running the Python install in cygwin with no success.

The version I am looking for is >= 3.1, and I was able to install 2.7 successfully under cygwin (which comes with 2.6 as the default).

By the way, I would like to run Python3 as python3 and not python. I don't want conflicts with the default python binaries that come with cygwin.


2 Answers 2


As of yesterday (Wed 25 July 2012), Python 3.2.3 is included in the standard Cygwin installer. Just run Cygwin's setup.exe again (download it from cygwin.com again if you need to), and you should be able to select and install it like any other package.

This will still install as python3, leaving any existing 2.x install in place, just as before:

$ python -V
Python 2.6.8
$ python3 -V
Python 3.2.3
$ ls -l $(which python) $(which python3)
lrwxrwxrwx 1 me Domain Users 13 Jun 21 15:12 /usr/bin/python -> python2.6.exe
lrwxrwxrwx 1 me root         14 Jul 26 10:56 /usr/bin/python3 -> python3.2m.exe
  • brilliant! thanks for keeping the question in mind!
    – eqb
    Jul 28, 2012 at 19:35
  • can't vote up, not enough rep :(
    – eqb
    Jul 28, 2012 at 19:35
  • @ethiopianqubit you should be able to Mark this answer as accepted regardless of your rep, though - just click on the grey tick.
    – me_and
    Jul 29, 2012 at 11:06
  • when I do which python in cygwin terminal, it prints /cygdrive/d/Programs/python/python-3.6.6-amd64/python (that is it refers to the Windows python). When I do which python3 in cygwin terminal, it prints /usr/bin/python3 (this one is the one which I installed through cygwin setup). Do I need to fix this?
    – Mahesha999
    Jun 19, 2018 at 10:05
  • @Mahesha999 I suspect you'll get a better response and more visibility if you ask your question as a new question, rather than here.
    – me_and
    Jun 20, 2018 at 12:11

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:

  1. Use the latest Cygwin setup.exe (at least version 2.738).
  2. Launch setup.exe with the -K flag, e.g.:

      cygstart -- /path/to/setup.exe -K http://cygwinports.org/ports.gpg
  3. On Choose Installation Type page, select "Install from Internet".

  4. 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.
  5. 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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .