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

前端 未结 10 524
孤城傲影
孤城傲影 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 15:08

    The SciPy installation page already recommends several ways of installing python with SciPy already included, such as WinPython.

    Another way is to use wheels (a built-package format):

    pip install SomePackage-1.0-py2.py3-none-any.whl
    

    The wheel packages you can find on: http://www.lfd.uci.edu/~gohlke/pythonlibs/

    For SciPy you need:

    • the NumPy wheel packages
    • and the SciPy wheel packages
    0 讨论(0)
  • 2020-12-04 15:09

    Always for Ubuntu/Debian, chjortlund's answer it's very good but not perfect, since this way you get an unoptimized BLAS library. You have simply to do:

    sudo apt install libatlas-base-dev
    

    and voila'!

    Source

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

    For Debian Jessie and Stretch installing the following packages resolves the issue:

    sudo apt install libblas3 liblapack3 liblapack-dev libblas-dev
    

    Your next issue is very likely going to be a missing Fortran compiler, resolve this by installing it like this:

    sudo apt install gfortran
    

    If you want an optimized scipy, you can also install the optional libatlas-base-dev package:

    sudo apt install libatlas-base-dev
    

    Source


    If you have any issue with a missing Python.h file like this:

    Python.h: No such file or directory

    Then have a look at this post: https://stackoverflow.com/a/21530768/209532

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

    For windows: Best is to use pre-compiled package available from this site: http://www.lfd.uci.edu/%7Egohlke/pythonlibs/#scipy

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