Installing SciPy and NumPy on Elementary OS
- From source
apt approach is perhaps the simplest option, but it isn’t recommended: depending on what repositories you have selected, you can end up with out-of-date versions of the SciPy and NumPy packages, which can lead to dependency headaches down the line.
Installing from source is a fine idea, but if it’s the right one for you, you probably wouldn’t be reading this article.
pip approach is the “right” way to do it. On most Linux platforms, there are two versions of
pip, one for each version of Python. The version for Python 2.x is contained in the
python-pip package; the version for Python 3.x, in the
python3-pip package. The former is accessed from the shell with
pip, the latter with
Most SciPy functions require NumPy, but, as of this writing,
pip doesn’t take NumPy as a dependency. So for a full install on Python 2.x, you’ll have to run:
sudo pip install scipy numpy
And for Python 3.x:
sudo pip3 install scipy numpy