What is the easiest way to install BLAS and LAPACK for scipy?

前端 未结 10 523
孤城傲影
孤城傲影 2020-12-04 14:12

I would like to run a programme that someone else has prepared and it includes scipy. I have tried to install scipy with

pip install scipy

相关标签:
10条回答
  • 2020-12-04 14:49

    "Why does a scipy get so complicated?

    It gets so complicated because Python's package management system is built to track Python package dependencies, and SciPy and other scientific tools have dependencies beyond Python. Wheels fix part of the problem, but my experience is that tools like pip/virtualenv are just not sufficient for installing and managing a scientific Python stack.

    If you want an easy way to get up and running with SciPy, I would highly suggest the Anaconda distribution. It will give you everything you need for scientific computing in Python.

    If you want a "short way" of doing this (I'm interpreting that as "I don't want to install a huge distribution"), you might try miniconda and then run conda install scipy.

    0 讨论(0)
  • 2020-12-04 14:49

    Using conda install scipy instead of pip solved the problem for me!

    0 讨论(0)
  • 2020-12-04 15:00

    For completeness, though this probably would not work well given your particular setup (external program + Windows), one can also acquire Scipy hassle-free as part of the (large) SageMath download.

    0 讨论(0)
  • 2020-12-04 15:03

    pip install Cython

    before

    pip install sklearn

    did the trick for me.

    0 讨论(0)
  • 2020-12-04 15:04

    Either use SciPy whl, download the appropriate one and run pip install <whl_file>

    OR

    Read through SciPy Windows issue and run one of the methods.

    OR

    Use Miniconda.

    Additionally, install Visual C++ compiler for python2.7 in-case it asks for it.

    0 讨论(0)
  • 2020-12-04 15:05

    I got this problem on freeBSD. It seems lapack packages are missing, I solved it installing them (as root) with:

    pkg install lapack
    pkg install atlas-devel  #not sure this is needed, but just in case
    

    I imagine it could work on other system too using the appropriate package installer (e.g. apt-get)

    0 讨论(0)
提交回复
热议问题