If you're using Linux, Python will most probably come pre-installed. If you're not sure, type the following at Command Prompt:
which python
Python is likely to be found in one of the following folders on Linux, depending on your distribution and particular installation:
- /usr/bin/python
- /bin/python
- /usr/local/bin/python
- /opt/local/bin/python
You can determine which particular version of Python is installed by typing the following at Command Prompt:
python --version
In the rare event that Python isn't already installed, you need to figure out which flavor of Linux you're using and download and install it. Here are the install commands as well as links to the various Linux Python distributions:
- Debian/Ubuntu (14.04):
sudo apt-get install python2.7 sudo apt-get install python2.7-devel
For more information, see the Debian Python page at https://wiki.debian.org/Python.
- Redhat Fedora/Centos/RHEL:
sudo yum install python sudo yum install python-devel
To install Fedora software, visit http://docs.fedoraproject.org/en-US/Fedora/13/html/User_Guide/chap-User_Guide-Managing_software.html.
- openSUSE:
sudo zypper install python sudo zypper install python-devel
More information on installing software can be found at http://en.opensuse.org/YaST_Software_Management.
- Slackware: For this distribution of Linux, it may be best to download a compressed tarball and install it from the source, as described in the following section.