Install Python on Ubuntu Linux

How to install Python on Linux

to update all installed packages

sudo apt-get update

to install python version 3.4

sudo apt-get install python3.4

How to install Python on a Linux server without root

download python 3


or python 2

wget --no-check-certificate


tar -xzf Python-3.5.1.tgz

run 'configure' and define your install directory (adapt path to your directory of read-write access)

cd Python-3.5.1

./configure prefix=/home/user/python

make install

add your Python path in ~/.bashrc

export PYTHONPATH=/home/user/python/bin:$PYTHONPATH

export PATH=/home/user/python/bin:$PATH

or, run python using full path


# install the package NumPy

python -m pip install NumPy

Alternative: Anaconda Python distribution

    • includes most popular Python packages

    • doesn’t require root admin permissions

Installing setuptools (easy_install)

Not recommended anymore, better use pip!

# download and install setuptools (add your local python path)

wget --no-check-certificate -O - | /home/user/python/bin/python3

run easy_install for installing packages 'numpy' and 'Bio'-python

/home/user/python/bin/easy_install numpy

/home/user/python/bin/easy_install -f biopython