问题
from mpl_toolkits.basemap import Basemap
gives
ImportError: No module named 'mpl_toolkits.basemap'
I installed basemap with conda
wayne@dors:~$ conda install basemap
Solving environment: done
# All requested packages already installed.
I am running ubuntu 15.04, Python3.4, matplotlib 2.1.1, numpy 1.8.2
How do I fix?
回答1:
Try to install it with this command:
conda install -c conda-forge basemap
"Only the 'crude' and 'low', resolution datasets are installed by default" .You may need to install the following for high resolution:
conda install -c conda-forge basemap-data-hires
回答2:
I think you need to install from source, not via conda
, as per the docs :
https://matplotlib.org/basemap/users/installing.html
来源:https://stackoverflow.com/questions/48388217/basemap-importerror-no-module-named-mpl-toolkits-basemap