Skip to content

Instantly share code, notes, and snippets.

@janikvonrotz
Last active October 22, 2015 06:18
Show Gist options
  • Save janikvonrotz/739313df400616f999d6 to your computer and use it in GitHub Desktop.
Save janikvonrotz/739313df400616f999d6 to your computer and use it in GitHub Desktop.
Ubuntu: Install Python #Ubuntu #Python

Introduction

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

Requirements

Installation

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

Source

Install Python Lamp - Digital Ocean Community

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment