E: Package 'Python-Scipy' Has No Installation Candidate

Upon installing a software, I am finding the following error multiple times.

$ sudo python setup.py install
Traceback (most recent call last):
  File "setup.py", line 24, in <module>
    from software_name import PACKAGE_NAME
  File "/home/username/Softwares/software_name/__init__.py", line 29, in <module>
import scipy
ImportError: No module named scipy

I can install many of the missing modules with, e.g., sudo apt-get install -y python-numpy, but sometimes I get:

username@username:~/Softwares/software_name$ sudo apt-get install -y 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

And I am really not sure what is going on?

1 Answer

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

apt install python3-scipy

You might be better off installing 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.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

David Miller

David Miller

Executive Financial & Market Analyst

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.

Share this article
Twitter Facebook Pinterest