How to install scipy and numpy on Ubuntu 16.04?
You can also use pip (the alternative Python package installer) to install numpy and scipy for the whole system:
sudo apt-get install python-pip
sudo pip install numpy scipy
This could install it regardless of dependency errors in the Ubuntu package manager.
To install the dependencies in all currently supported versions of Ubuntu open the terminal and type the following commands:
sudo apt update
sudo apt install --no-install-recommends python2.7-minimal python2.7
sudo apt install python-numpy # in Ubuntu 20.04 and earlier
sudo apt install python-scipy # in Ubuntu 18.04 and earlier
For Python 3.x
sudo apt update
sudo apt install --no-install-recommends python3-minimal python3
sudo apt install python3-numpy python3-scipy