I'm using Windows 10, anaconda navigator, and jupyter notebook 5.7.4 throws an error when I try to import 'basemap' using "from mpl_toolkits.basemap import basemap"
I'm very new to python. Following a tutorial to learn GIS mapping with python, I've installed all the required packages: pandas, numpy, geopandas, basemap, matplotlib, pillow and a few others.
The tutorial code says to write "from mpl_toolkits.basemap import basemap" However, mpl_toolkits does not appear to be an available package when I search for it in the anaconda navigator or in the anaconda prompt.
Having searched the anaconda user guide and the matplotlib web page, I am inferring that mpl_toolkits is included within matploblib?
The error that results is this: ImportError: cannot import name 'basemap' from 'mpl_toolkits.basemap' (C:\Users\Kevin\AppData\Local\conda\conda\envs\mapping\lib\site-packages\mpl_toolkits\basemap__init__.py)
# command to display matplotlib plots inline within the ipython notebook
%matplotlib inline
# import necessary modules
import numpy as np, matplotlib.pyplot as plt, pandas as pd, geopandas as
gpd
from mpl_toolkits.basemap import basemap
from shapely.geometry import Point
from geopy.distance import great_circle
I expect the jupyter notebook to load all of the modules but instead I get the above error.
Any help is much appreciated, this is my first go at something like this so I am probably making a simple neophyte mistake.