Reputation: 1841
I have Python 2.7 running and trying to install scipy by using easy_install which returns following errors:
Searching for scipy
Reading http://pypi.python.org/simple/scipy/
Reading http://www.scipy.org
Reading http://sourceforge.net/project/showfiles.php?group_id=27747&package_id=19531
Reading http://new.scipy.org/Wiki/Download
Best match: scipy 0.11.0
Downloading http://pypi.python.org/packages/source/s/scipy/scipy-0.11.0.zip#md5=40b700ddde9ddab643b640fff7a9d753
Processing scipy-0.11.0.zip
Running scipy-0.11.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-49BQSz/scipy-0.11.0/egg-dist-tmp-KMjwKy
Running from scipy source directory.
/usr/lib64/python2.7/site-packages/numpy/distutils/system_info.py:1425: UserWarning:
Atlas (http://math-atlas.sourceforge.net/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [atlas]) or by setting
the ATLAS environment variable.
warnings.warn(AtlasNotFoundError.__doc__)
/usr/lib64/python2.7/site-packages/numpy/distutils/system_info.py:1434: UserWarning:
Blas (http://www.netlib.org/blas/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [blas]) or by setting
the BLAS environment variable.
warnings.warn(BlasNotFoundError.__doc__)
/usr/lib64/python2.7/site-packages/numpy/distutils/system_info.py:1437: UserWarning:
Blas (http://www.netlib.org/blas/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [blas_src]) or by setting
the BLAS_SRC environment variable.
warnings.warn(BlasSrcNotFoundError.__doc__)
error:
Blas (http://www.netlib.org/blas/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [blas]) or by setting
the BLAS environment variable.
So I installed Blas and Atalas by executing
apt-get install blas
apt-get install atlas
However, the easy_install errors don't disappear.
Thanks!
Upvotes: 28
Views: 60215
Reputation: 29524
If you are using Python3, You can install packages using apt-get
sudo apt-get install python3-numpy python3-scipy
Upvotes: 5
Reputation: 427
If you want to still install using pip
, you can use build-dep to get the dependencies of python-numpy and python-scipy, and then install using pip
sudo apt-get build-dep python-numpy python-scipy
Substitute for python3 as the other answers state of that's what you're looking for.
Upvotes: 4
Reputation: 2228
What worked for me:
To actually install scipy from PIP, you need packages libatlas-base-dev
(libraries etc. for ATLAS/BLAS) and gfortran
(GNU Fortran compiler).
Once these packages are installed, the scipy installer should finish as expected.
Upvotes: 74
Reputation: 1841
I solved the issue by running (similar to previous suggestions)
apt-get install scipy
Upvotes: 2
Reputation: 27104
Ubuntu puts library files in a rather exotic directory.
/usr/lib/x86_64-linux-gnu/
or something, depending on your architecture.
You need to add this directory to the site.cfg file or the BLAS environment variable.
If easy install also needs the header files, you need to install the respective -dev packages.
But, like @pitsanu-swangpheaw suggests, you can also install to the site packages directory using the ubuntu package manager.
sudo apt-get install python-numpy python-scipy
Upvotes: 31