E: 包 'python-scipy' 没有安装候选

Posted

技术标签:

【中文标题】E: 包 \'python-scipy\' 没有安装候选【英文标题】:E: Package 'python-scipy' has no installation candidateE: 包 'python-scipy' 没有安装候选 【发布时间】:2022-01-22 07:32:38 【问题描述】:

在安装软件时,我多次发现以下错误。

$ 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

我可以安装许多缺少的模块,例如 sudo apt-get install -y python-numpy,但有时我会得到:

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

我真的不确定发生了什么?

【问题讨论】:

【参考方案1】:

你想要的包是python3-scipy,而不是python-scipy。可以使用以下方式安装:

apt install python3-scipy

您最好通过 pip(对于 Python 2)或 pip3(对于 Python 3)安装 scipy。 pip 是 Python 包的包管理器。

pip install scipy

pip3 install scipy

如果以后遇到类似问题,可以使用 pip3 search scipy 和相关搜索词来查找需要的包。详情请查看 manpip3

【讨论】:

让我知道这是否适合你,我可以更新它

以上是关于E: 包 'python-scipy' 没有安装候选的主要内容,如果未能解决你的问题,请参考以下文章

altium designer09安装好以后是这样的,不知道怎么破解,需要啥东西。打开软件候就是

E: 使用 docker compose 在 php-fpm 映像构建中,包 'mysql-client' 没有安装候选

E: 软件包 ffmpeg 没有可供安装的候选者

双击wps安装包没有反应。无法安装 怎么办

Linux rpm -e卸载命令e是哪个单词

如何使用 pip 卸载可编辑包(使用 -e 安装)