3

I have two versions of python on my RedHat 6 machine: 2.7.8 that came with the system originally and 2.7.10 that I've installed using miniconda for a project. I have to use the newer version to run some demo code for another project. The demo script produced this error:

ImportError: No module named scipy.sparse

Running pip install scipy failed with a bunch of warnings and then this:

numpy.distutils.system_info.NotFoundError: no lapack/blas resources found

numpy is already installed. That is, I get Requirement already satisfied when trying to pip install numpy.

The yum install command recommended on the SciPy install page completed fine but did not help, probably because this python version is installed at a non-default location.

Same result after building blas and lapack from source as described here

How do I get scipy to install properly?

Thx

Community
  • 1
  • 1
I Z
  • 5,719
  • 19
  • 53
  • 100

3 Answers3

2

I think you don't have lapack/blas library.

try this.

yum install python-devel python-nose python-setuptools gcc gcc-gfortran gcc-c++ blas-devel lapack-devel atlas-devel

it will install all what you need.

0

Value of a Peace of mind once starting always from a [Defined state]

There are many issues with pip / yum installer strategies that we, mortals, can spend ages on our attempts to get resolved.

Since I started to use the Travis Oliphant's Anaconda fully-fledged package-manager, these dependency-related / version-colliding issues simply disappeared. Well did not disappear, but principally do not appear.

Why?

Anaconda package-manager both allows one to keep separate versions ready / reconfigurable via Anaconda for individual python launches

and

Anaconda resolves updates in a smart way, one would never experience with manual/semi-manual pip/yum installers

In other words, if you strive to get rid of issues, opt to install Anaconda and start using it's (parallel) multi-versions installation / setup controls and it's smart package-manager facilities.

n.b.: this is not a commercial/spam/PR, this is just personal experience after many years of troubles with individual package updates' collisions / compatibility back-testing troubles in multi-py 2.5 / 2.6 / 2.7 installations environments

user3666197
  • 1
  • 6
  • 50
  • 92
0

If you use Anaconda/miniconda, then use the conda package manager, not pip: conda install scipy.

pv.
  • 33,875
  • 8
  • 55
  • 49