10/22/2015 - 6:07 AM

Ubuntu: Install Python #Ubuntu #Python

Ubuntu: Install Python #Ubuntu #Python


Configure Python 3 and install pip. Pip allows us to easily manage any Python 3 package we would like to have.

# Requirements


First, check your current Python version.

python --version

On a fresh Ubuntu server, this might output:

Python 2.7.6

We would like to have python run Python 3. So first, let's remove the old 2.7 binary.

sudo rm /usr/bin/python

Next, create a symbolic link to the Python 3 binary in its place.

sudo ln -s /usr/bin/python3 /usr/bin/python

If you run python --version again, you will now see Python 3.4.0.

To install pip make sure update the aptitude repository index.

sudo apt-get update

To install pip, simply run the following:

sudo apt-get install python3-pip


Install Python Lamp - Digital Ocean Community