Reputation: 2103
On Google Colab I'm getting an error when trying to import GeoJSON from IPython.display:
Any help on how to properly import it would be appreciated.
Upvotes: 3
Views: 4048
Reputation: 346
Google Colaboratory has an older version of IPython installed (v5.5.0
as of the time I'm writing this). The best way to fix this is to include the following line in the Colab notebook before your import
statements:
!pip3 install --upgrade IPython
This should fix it for you!
Upvotes: 0
Reputation: 2103
Exactly how to execute in Google Colab:
Upvotes: 2
Reputation: 1373
I found the issue to be caused by your Collab runtime having an older version of IPython installed.
pip freeze
Output
ipython==5.5.0
ipython-genutils==0.2.0
ipython-sql==0.3.9
ipywidgets==7.5.1
Since the collab was created sometime ago
Updating the module fixed the issue for me
pip install -U IPython
After which you can restart your runtime and the changes should be reflected
pip freeze
Output
ipython==7.16.1
ipython-genutils==0.2.0
ipython-sql==0.3.9
Upvotes: 3