notebooks-ai / notebooks-help

Issues with Notebooks.ai? Create an issue here!
https://notebooks.ai
MIT License
14 stars 5 forks source link

Unable to use mpl_toolkits.basemap #43

Closed sccx closed 4 years ago

sccx commented 4 years ago

The Notebook throws the following error when I try to run code that depends on mpl_toolkits.basemap. The code works locally on my Mac OS machine, but not in the notebook.

ModuleNotFoundError Traceback (most recent call last)

in 9 import matplotlib 10 import matplotlib.pyplot as plt ---> 11 from mpl_toolkits.basemap import Basemap 12 from scipy.stats import circmean 13 from matplotlib.colors import LogNorm ModuleNotFoundError: No module named 'mpl_toolkits.basemap'
santiagobasulto commented 4 years ago

There are different ways to install this it seems 1, but it's not part of Notebooks.ai

A quick look at Basemap's repo shows this warning:

Warning: this package is being deprecated in favour of cartopy.

To install cartopy:

!apt-get install -y libproj-dev proj-data proj-bin libgeos-dev
!pip install cython
!pip install Cartopy

image