3

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 3

10

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.

2

Python 2 is EOL, but...

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

cd ~/Downloads
wget http://archive.ubuntu.com/ubuntu/pool/universe/p/python-scipy/python-scipy_0.19.1-2ubuntu1_amd64.deb
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.

1

Just do this in Ubuntu

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .