AttributeError:模块“scipy.sparse”没有属性“coo_array”

Eli*_*pez 4 attributeerror anaconda conda jupyter jupyter-notebook

在我的 Jupyter Notebook 中出现此错误 使用 conda 而不是 pip 解决此问题的最佳方法是什么

我已经尝试过conda upgrade --all,但似乎不起作用

mer*_*erv 13

这些scipy.sparse.*_array功能是在 v1.8 中引入的。该networkx软件包从 v2.7 开始需要scipy >=1.8。因此,要么升级 SciPy

conda install 'scipy>=1.8'
Run Code Online (Sandbox Code Playgroud)

或降级 NetworkX:

conda install 'networkx<2.7'
Run Code Online (Sandbox Code Playgroud)

这里的部分问题是,根据开发人员的建议networkx,Conda Forge 不再明确要求scipy作为 的依赖项networkx,因此不再有任何约束。我提出了一个关于原料的问题,以重新审视协同安装的限制(run_constrained规范)。