How to Install Python on Cygwin

By Zicheng Ren

Python can be run on a variety of platforms such as Windows, Unix and Linux. Cygwin is an open source tool that brings all the functionality from Linux to Windows, like a Linux emulator. If you'd like command line operation for programming run a Linux shell such as Cygwin on Windows to use Python. You can install the Python package included in Cygwin, set up the Python development environment within Cygwin or use a Python package not included in Cygwin.

Use the Python Package in Cygwin

The simplest way to install Python is to install the Python package right at the beginning of the Cygwin installation. Cygwin lets you choose among supported packages such as Ruby, PHP and Python. Once installed, invoke Python in Cygwin by typing "python -i" without the quotation marks.

Set Up the Python IDE

If you choose to install a full version of Python and set up the development environment in Cygwin, you need to install both Cygwin and Python individually. When you install Cygwin, search for and include these three software packages: openssh, git and curl. After the installation is finished, open the Cygwin Terminal and search for Python with the command"echo "PATH=\PATH:/cygdrive/c/Python32" >> .bash_profile" without the outermost quotation marks, where you replace "c" with the directory where you stored Python and "Python32" with the version of Python you downloaded.

Use an Independent Python Package

If you choose to install a Python package not included in Cygwin, use setuptools with EasyInstall. Install setuptools and download a Python module package, then type the following command: "easy_install /my_downloads/OtherPackage-3.2.1-py2.3.egg" without quotation marks into the Cygwin Terminal in order to install the Python package in Cygwin, replacing "OtherPackage-3.2.1-py2.3.egg" with the name of the Python package you have downloaded.