We highly recommend that users use the Anaconda python distribution. Instructions are available here Anaconda python distribution.
Almost all versions of Linux ship with a recent enough version
of Python, so it is unlikely that you will need to install Python yourself.
If you do not have python you can find the source at the
Python official site.
sudo apt-get install python2.7-dev or a similar command,
depending on your linux distro.
python-dev provides you the required Python development headers.
Debian based (eg. Ubuntu)¶
On Ubuntu, most of the pre-reqs are available in the Ubuntu software repos and can be installed using apt-get:
sudo apt-get install python-dev sudo apt-get install python-qt4 sudo apt-get install git-core sudo apt-get install python-numpy sudo apt-get install python-scipy sudo apt-get install python-matplotlib sudo apt-get update
Now we shall install pip.
Most Python distributions ship with a tool called easy_install which assists with installing Python packages.
Although easy_install is capable of installing most of the dependencies needed for SunPy itself, a more powerful tool called pip provides a more flexible installation (including support for uninstalling, upgrading, and installing from remote sources such as GitHub) and should be used instead.
Use easy_install to install
sudo easy_install pip
You are now ready to install SunPy and its dependencies.