I'm using Google Colab, to test Keras models. A library I'm using (hyperopt) seems to misbehave with another library with a specific version (networkx == 2.1). It was mentioned that the latest version of hyperopt on the master branch of its repository has solved this problem, but it isn't working in my case.
I tried !pip uninstall networkx
, followed by !pip install networkx==1.11
, finally checking the version with
import network x
print(networkx.__version__)
Which still prints 2.1
Is it not possible to downgrade a package in Google Colab?
Error is similar to this: https://github.com/hyperopt/hyperopt/pull/319
Running Python 3.
That might be happening because you imported networkx before uninstalling 2.1. You can just restart the notebook and go through the uninstall step before importing networkx.
[1] !pip uninstall networkx -y
Uninstalling networkx-2.1:
Successfully uninstalled networkx-2.1
[2] !pip install networkx==1.11
Collecting networkx==1.11
Using cached networkx-1.11-py2.py3-none-any.whl
Requirement already satisfied: decorator>=3.4.0 in /usr/local/lib/python3.6/dist-packages (from networkx==1.11)
Installing collected packages: networkx
Successfully installed networkx-1.11
[3] import networkx
[4] networkx.__version__
'1.11'
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