This guide will show you how to easily install Python 2.7 on different systems On Windows:
Download Python 2.7 from the official site:
[You must be registered and logged in to see this link.]Here’s a direct link:
[You must be registered and logged in to see this link.]After installation is completed, you can run any Python file (File Extention: .py) by simply clicking on it. And you can edit it by Right click>Edit with IDLE
On Ubuntu:
In Terminal, run the following commands (type y and press Enter if it asked for any confirmation):
sudo apt-get install build-essential libncursesw5-dev libreadline-dev libssl-dev libgdbm-dev libc6-dev libsqlite3-dev tk-dev
Then download Python 2.7:
wget
[You must be registered and logged in to see this link.]tar -xvf Python-2.7.3.tgz && cd Python-2.7.3/
./configure
make
sudo make altinstall
And you are done. Now Python2.7 is installed. you can run .py files by typing python2.7 filename.py
On CentOS:
There’s two ways to do this, first one is by downloading this file:
[You must be registered and logged in to see this link.]Download it on your CentOS system, then run the following commands:
chmod +x installpy.sh
./installpy.sh
This will start the installation process. After it’s completed, you can run .py files by typing python2.7 filename.py
Second method is to type the following commands one by one:
yum groupinstall "Development tools"
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel
wget
[You must be registered and logged in to see this link.]tar xf Python-2.7.3.tar.bz2
cd Python-2.7.3
./configure --prefix=/usr/local
make && make altinstall
wget
[You must be registered and logged in to see this link.]tar xf distribute-0.6.35.tar.gz
cd distribute-0.6.35
python2.7 setup.py install
By the way, the commands above are the same as the ones in the installpy.sh file
That’s all. If you had any troubles in following this guide, feel free to comment on this post or email me.