Importing mpl_toolkits.basemap on Windows?

Geena picture Geena · Jan 24, 2016 · Viewed 36.9k times · Source

I have recently started using Python 3.5 and Anaconda on my Windows pc. I am trying to plot a map. However, When I am in my Jupyter notebook and i type the command

import mpl_toolkits.basemap

I get an error message saying 'no module name' 'mpl_toolkits.basemap' However, I have the module downloaded and in the same C:\Users\Geena file as my .matplotlib, .ipython, .jupyter files, etc.

Anyone know how I can fix this?

Answer

Thedoorsalive picture Thedoorsalive · Oct 31, 2016

I've had this issue with anaconda on my windows 7.
I found the way to fix it with python 3.5:
You need to run with administrator rights "Anaconda Prompt" and in "Anaconda Prompt" run following command:

conda install -c conda-forge basemap-data-hires=1.0.8.dev0

, it will show new packages that you need to install and will ask you to install it - say 'Yes'.
After that new packages will be installed and the issue "import mpl_toolkits.basemap" will be fixed.

Thank you.