Score:1

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

tr flag

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? I have read on another thread that the 20.04 LTS repository has NumPy, but does not have SciPy.

EDIT:

$ sudo apt install python-pip
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package python-pip 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
However the following packages replace it:
  python3-pip

E: Package 'python-pip' has no installation candidate

$ pip install scipy
Requirement already satisfied: scipy in /usr/lib/python3/dist-packages (1.3.3)

$ sudo apt install python3-pip
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python3-pip is already the newest version (20.0.2-5ubuntu1.6).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

$ sudo pip install scipy
[sudo] password for user_name: 
Requirement already satisfied: scipy in /usr/lib/python3/dist-packages (1.3.3)

$ python --version
Python 2.7.18
pLumo avatar
in flag
`However the following packages replace it: python3-pip`, updated my answer :-)
pLumo avatar
in flag
`scipy` is already installed for `python3`.
Py-ser avatar
tr flag
@pLumo see the new edits
N0rbert avatar
zw flag
What are the name and download URL of "a software"?
pLumo avatar
in flag
@Py-ser, see my update
Score:2
in flag

Best source for looking up packages in ubuntu repositories is packages.ubuntu.com

You can search for scipy and will see, that it was taken out from the universe after 18.04.

I can only speculate about the reason, maybe no maintainer for the package could be found.

However, you can easily install it via pip:

sudo apt install python3-pip
pip install scipy

Note, that pip will default to install a package to your local user. If you need to run a python script with sudo or another user, you need to install it systemwide with:

sudo pip install scipy

If your python still not recognize the package, you may need to check if python maybe links to python2. Check with python --version.

Py-ser avatar
tr flag
Not really, please see the edit
Py-ser avatar
tr flag
edited again, no luck. What if, indeed, python links to python2?
pLumo avatar
in flag
you run `python3 myscript`. Or install `sudo apt install python-is-python3` package
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.