SciPy/Python install on Ubuntu

前端 未结 8 1165
轻奢々
轻奢々 2020-12-04 23:54

I\'m currently following the tutorial Installing the SciPy Stack to install SciPy on Ubuntu 12.04 (Precise Pangolin) (I can\'t use apt-get install

相关标签:
8条回答
  • 2020-12-05 00:34

    You're trying to build SciPy from source.

    If you just want to install SciPy, use this command:

    sudo apt-get install python-scipy
    
    0 讨论(0)
  • 2020-12-05 00:37

    PyPM is a good way to install it. The version is beta 0.10.1 and it includes all of the dependencies. You need Active Python to access PyPM, but that you should be able to install easily.

    pypm install scipi
    
    0 讨论(0)
  • 2020-12-05 00:37

    My usual work flow is to use a virtualenv to have a Python distribution with up-to-date packages.

    Within this environment you can than install and update all packages you need with pip and without any sudo calls.

    So if you only need SciPy (and NumPy) this would be:

    $ sudo apt-get install python-virtualenv python-pip
    $ sudo apt-get build-dep python-numpy python-scipy
    $ # Create virtualenv in home
    $ virtualenv .myenv
    $ # Activate the virtualenv
    $ source .myenv/bin/activate
    (myenv)$ pip install -U numpy
    (myenv)$ pip install -U scipy
    

    (If you don't have root access, you can install virtualenv and pip as described here. However, you need the dependencies of NumPy and SciPy.)

    You can include source .myenv/bin/activate in your .bash_profile and your shell will always start with that environment. If you use requirement files it is easy to install and maintain the same environments on all your machines.

    0 讨论(0)
  • 2020-12-05 00:39

    I had the same problem as the OP (on Red Hat Linux 5.7 for me; yes, I know that's old) and all was fixed by installing the ATLAS headers (and "static libs", it says) via:

     yum install atlas-devel
    
    0 讨论(0)
  • 2020-12-05 00:45

    For Fedora 20:

    pip install virtualenv virtualenvwrapper
    mkvirtualenv scipy_project
    sudo yum-buildep scipy
    pip install scipy
    

    I hope it helps!

    0 讨论(0)
  • 2020-12-05 00:52

    For Ubuntu 20.04 on Raspberry Pi 4, Use following:

    sudo apt-get install libblas3 liblapack3 liblapack-dev libblas-dev gfortran libatlas-base-dev
    

    and then use pip to install latest packages.

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