Starting‎ > ‎Download & Install‎ > ‎

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
wget http://www.python.org/ftp/python/3.5.1/Python-3.5.1.tgz
or python 2
wget --no-check-certificate https://www.python.org/ftp/python/2.7.8/Python-2.7.8.tgz

decompress
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
/home/user/python/bin/python3.5

 → Install python packages (pip install)

# install the package NumPy
python -m pip install NumPy


Alternative: Anaconda Python distribution

  • includes most popular Python packages
  • doesn’t require root admin permissions
https://store.continuum.io/cshop/anaconda/





Installing setuptools (easy_install)

Not recommended anymore, better use pip!

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

wget --no-check-certificate https://bootstrap.pypa.io/ez_setup.py -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 http://biopython.org/DIST/ biopython

https://pypi.python.org/pypi/setuptools#unix-wget