SciPy/Python install on Ubuntu
Had the same problem. The following worked for me:
sudo apt-get install libblas-dev
sudo apt-get install liblapack-dev
sudo apt-get install gfortran
You need to download and install Atlas as the output suggests. After that, retry the SciPy installation.
Other option would be apt-get install
older version. This will auto-install all the dependencies; and then install the newer one by hand. This will result in two libraries on your machine, one in /usr/share/pyshared
most likely and another one somewhere under /usr/local
, but you can make sure which one is loaded by altering the module loading path.
Also, if you will ommit --prefix=/usr/local
, while installing newer version on top of older one, it will just get overwritten and the path mangling won't be required.
My usual work flow is to use a virtualenv
to have a Python distribution with up-to-date packages.
Within this environment you can than install and update all packages you need with pip
and without any sudo
calls.
So if you only need SciPy (and NumPy) this would be:
$ sudo apt-get install python-virtualenv python-pip
$ sudo apt-get build-dep python-numpy python-scipy
$ # Create virtualenv in home
$ virtualenv .myenv
$ # Activate the virtualenv
$ source .myenv/bin/activate
(myenv)$ pip install -U numpy
(myenv)$ pip install -U scipy
(If you don't have root access, you can install virtualenv
and pip
as described here. However, you need the dependencies of NumPy and SciPy.)
You can include source .myenv/bin/activate
in your .bash_profile
and your shell will always start with that environment. If you use requirement files it is easy to install and maintain the same environments on all your machines.