Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't upgrade Scipy

I'm trying to upgrade Scipy from 0.9.0 to 0.12.0. I use the command:

sudo pip install --upgrade scipy

and I get all sorts of errors which can be seen in the pip.log file here and I'm unfortunately not python-savvy enough to understand what's wrong. Any help will be appreciated.

like image 535
Gabriel Avatar asked Jul 29 '13 13:07

Gabriel


People also ask

How do I upgrade SciPy to a specific version?

If you already have SciPy installed and want to upgrade to a newer version, use the same install mechanism as you have used to install SciPy before. Before upgrading to a newer version, it is recommended to check that your own code does not use any deprecated SciPy functionality.

Does Python 3.10 support SciPy?

I suppose this is caused because Scipy has no Python 3.10 support (yet), so trying to install it with that Python should fail somewhere. Consider using a lower Python version, or use Anaconda (like a user suggested).

How do I install SciPy on Windows 10?

Type and run pip install scipy in the command prompt. This will use the Python Package index, and install the core SciPy packages on your computer. You can also install other core packages like Numpy and Matplotlib by using the pip install numpy and pip install matplotlib commands.


2 Answers

I had the same problem upgrading from scipy 0.9 to 0.13.3, and I solved it using the following answer and installing:

sudo apt-get install libblas-dev

sudo apt-get install liblapack-dev

sudo apt-get install gfortran

like image 94
Argitzen Avatar answered Oct 17 '22 19:10

Argitzen


The error messages all state the same: You lack BLAS (Basic Linear Algebra Subroutines) on your system, or scipy cannot find it. When installing packages from source in ubuntu, as you are effectively trying to do with pip, one of the easiest ways to make sure dependencies are in place is by the command

$ sudo apt-get build-dep python-scipy

which will install all packages needed to build the package python-scipy. You may in some cases run into the problem that the version of the source package you are trying to install have different dependencies than the version included with ubuntu, but in your case, I think chances are good that the above command will be sufficient to fetch BLAS for you, headers included.

like image 40
josteinb Avatar answered Oct 17 '22 19:10

josteinb