我一直在尝试安装一些 Python 库和包,但不断收到此错误。这是一个示例,但我在 matplotlib 和 panda 等方面面临同样的问题。
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
Run Code Online (Sandbox Code Playgroud)
我尝试启用 Universe 存储库,结果发现它已经启用。所以我还无法弄清楚这个问题。预先感谢您的帮助。
你想要的包是python3-scipy
,不是python-scipy
。可以使用以下方式安装:
apt install python3-scipy
Run Code Online (Sandbox Code Playgroud)
您可能最好scipy
通过pip
(对于 Python 2)或pip3
(对于 Python 3)进行安装。pip
是 Python 包的包管理器。
pip install scipy
Run Code Online (Sandbox Code Playgroud)
或者
pip3 install scipy
Run Code Online (Sandbox Code Playgroud)
如果您以后遇到类似的问题,可以使用pip3 search scipy
相关搜索词来查找所需的包。查看man pip3
详情。
归档时间: |
|
查看次数: |
17614 次 |
最近记录: |