Getting this error in my Jupyter Notebook What would be the best way to fix this utilizing conda instead of pip
I've attempted conda upgrade --all
and that didnt seem to work
The scipy.sparse.*_array
functions were introduced with v1.8. The networkx
package started requiring scipy >=1.8
with v2.7. So, either upgrade SciPy
conda install 'scipy>=1.8'
or downgrade NetworkX:
conda install 'networkx<2.7'
Part of the issue here is that, at the recommendation of a networkx
developer, Conda Forge stopped explicitly requiring scipy
as a dependency of networkx
, and therefore there is no longer any constraint. I opened an issue on the feedstock to revisit coinstallation constraints (run_constrained
specifications).
As mentioned in this Github comment, I was trying to calculate the page rank (networkx.pagerank
) of a graph on Google Colab when I encountered the same error. After executing the following code, the issue was resolved for me:
!pip install --upgrade scipy networkx
A Side Note:
pip install
refers to installing packages and leave the package as-is if it is already installed. But the--upgrade
flag instructspip
to uninstall anything which is being upgraded/replaced. For more info on this, refer this official doc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With