E: Package 'python-scipy' has no installation candidate Ubuntu 20.04

I've been trying to install some Python libraries and packages and keep getting this error. This is a sample but the same issue i face with matplotlib and panda and so on.

sudo apt-get install python-scipy
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python-scipy is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'python-scipy' has no installation candidate

I tried enabling universe repository andit turns out it is already enabled. So i can't figure out the issue yet. Thank in advance for your help.

2

3 Answers

The package you want is python3-scipy, not python-scipy. It can be installed using:

apt install python3-scipy

You might be better off to install scipy via pip (for Python 2) or pip3 (for Python 3). pip is a package manager for Python packages.

pip install scipy

or

pip3 install scipy

If you run into a similar problem in the future, you can use pip3 search scipy with the relevant search term to look for the required package. Check out man pip3 for the details.

Python 2 is EOL, but...

you can still install this package by downloading it from 18.04 LTS repository with

cd ~/Downloads
wget
sudo apt-get install ./python-scipy_0.19.1-2ubuntu1_amd64.deb

and then use it was planned.


Note: what is interesting - the 20.04 LTS repository has NumPy, but does not have SciPy. Very strange decision as from user point-of-view.

Just do this in Ubuntu

sudo apt install python3-numpy python3-scipy python3-matplotlib python3-pandas python3-sympy python3-nose

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like