【发布时间】:2017-06-20 04:03:01
【问题描述】:
我使用sudo apt-get install python-scipy 来安装 scipy。这会将所有文件放在/usr/lib/python2.7.dist-packages/scipy 中。我最好的猜测是它选择了那个位置,因为 python 2.7 是 python 的默认版本。但是,我也想将 scipy 与 python 3 一起使用。是否需要为 python 3 重新构建包,还是我可以将 python 3 指向现有版本?
我尝试使用 pip 安装两个并行版本,但我无法为我的系统安装依赖项 libblas3。
最好的方法是什么?
我在使用 Debian Jessie。
【问题讨论】:
-
在基于 debian 的发行版上为 python3.x 安装 scipy:
sudo apt-get install python3-scipy -
您可以使用您选择的python 版本
sudo python -m pip install scipy调用pip。如果你想安装 python 3,只需使用 python3。 -
@M.T 我认为这是首选。其他几个 SO 问题指出 pip 在 scipy 上运行并不顺利。 (例如stackoverflow.com/questions/11114225/…)奇怪的是,这在 scipy 安装页面上从未提及。如果您想将此列为答案,我会接受。