これでエラーが出た
from mpl_toolkits.basemap import Basemap
ModuleNotFoundError: No module named 'mpl_toolkits.basemap'
これを入れてみた
!pip install mpl_toolkits
!conda install -y basemap
またエラーが出た
KeyError: 'PROJ_LIB'
環境変数が必要みたいなので、以下のコードを丸ごとコピーしてjupyterに貼った
import os
import conda
conda_file_dir = conda.__file__
conda_dir = conda_file_dir.split('lib')[0]
proj_lib = os.path.join(os.path.join(conda_dir, 'share'), 'proj')
os.environ["PROJ_LIB"] = proj_lib
from mpl_toolkits.basemap import Basemap
無事に直りました!
こちらを参考にしました
http://hirotaka-hachiya.hatenablog.com/entry/2019/01/27/220047