在 Anaconda 中升级到 scipy 1.7?

时间:2021-07-22 21:26:12

标签: python scipy anaconda

我的 Conda 安装中目前有 scipy 1.6.3,但我需要 scipy 1.7,因为它具有额外的重要功能。我在anaconda提示符下试了几个代码,比如:

<块引用>

conda 更新 --all

还有

<块引用>

conda 安装 scipy

但是,当我输入“conda list”命令查看安装的 scipy 版本时,它仍然是 1.6.3(不是最新版本,即 1.7)。

你知道我做错了什么吗?谢谢!

3 个答案:

答案 0 :(得分:1)

试试:

$ conda install -c conda-forge scipy

1.7 版:https://anaconda.org/conda-forge/scipy

1.6 版:https://anaconda.org/anaconda/scipy

答案 1 :(得分:0)

我尝试时得到了这个:

STAT-Spip-~/Unix/Python/Tests ? conda create -n TEST -c conda-forge scipy
STAT-Spip-~/Unix/Python/Tests ? conda activate TEST
TEST-Spip-~/Unix/Python/Tests ? python
Python 3.9.6 | packaged by conda-forge | (default, Jul 11 2021, 03:36:15)
[Clang 11.1.0 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import scipy
>>> dir(scipy)
['test']
>>>
>>> dir(scipy.test)
['__call__', '__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'module_name']

似乎 conda-forge 上的 scipy 1.7 有点奇怪:-((

osx-64 频道同样的问题

奥利维尔

答案 2 :(得分:0)

感谢您提出这个问题!我刚刚遇到了同样的问题。命令 conda install scipy=1.7.0 --yes 是不够的。 conda install -c conda-forge scipy=1.7.0 --yes 对我有用。过了一段时间才更新。

重要编辑:在 anaconda 中为我升级到 SciPy 1.7.0 使我无法使用 SciPy。导入 SciPy 来检查版本会给我以下错误: FileNotFoundError: Could not find module 'C:\Users\Computer\anaconda3\lib\site-packages\scipy\.libs\libbanded5x.X7D476RWJKO3TRH4FXIEB4YEAKNOYBT4.gfortran-win_amd64.dll' (or one of its dependencies). Try using the full path with constructor syntax.

我使用 conda update --all --yes 恢复到 SciPy 1.6.2(conda 显然会使用此命令删除/降级不兼容的软件包版本,即使它们是最新版本)。 SciPy 再次对我有用。

我不介意 Scipy 现在对我来说是 1.6.2。我会等到 Anaconda/conda 能赶上。

相关问题