how to install geoplot on google colab

1.5k views Asked by At

How can we install geoplot in google colab?

!pip install geoplot

The above gives

Collecting geoplot
  Using cached https://files.pythonhosted.org/packages/e1/8f/46133752e1f02e70501939e739b81cbc85c79d7398c963b8a25a3178bffe/geoplot-0.4.1-py3-none-any.whl
Requirement already satisfied: mapclassify>=2.1 in /usr/local/lib/python3.6/dist-packages (from geoplot) (2.4.2)

But when I try to import geoplot the package is unrecognised

2

There are 2 answers

3
DataCrusade1999 On

I think they don't recommend using pip install geoplot here is a link to their documentation hope it helps you can use conda though.

2
korakot On

Cartopy is required for geoplot. You need to use apt to install it. Then, you can install geoplot with pip normally.

!apt install python3-cartopy
!pip install geoplot

Here's an example colab notebook