I'm using python 3.6.4 on Windows 7 Family Premium (32bit).
Because I was a bit frustrated by the message "no module named 'mpl_toolkits.basemap'", I searched for and tried a dozen of solutions without success : various versions, building from source, problems with VS version, nmake, ... You all know what I mean ;-)
I finally found a quite simple solution that works perfectly well for me :-) Here it is !
- from here I downloaded
basemap‑1.1.0‑cp36‑cp36m‑win32.whl
- I changed the current dir to my download dir
- I installed the wheel with
python -m pip basemap‑1.1.0‑cp36‑cp36m‑win32.whl
- I did the same for
matplotlib‑2.2.3‑cp36‑cp36m‑win32.whl
You DO read the versions correctly : matplotlib 2.2.3 and basemap 1.1.0
Everything works fine for me and I finally can plot OSM POI's on a map of Belgium, without any 'trickery' at import :
import requests # to fetch OSM data
import json # to get the response
from mpl_toolkits.basemap import Basemap # ... Belgium is there !
import numpy as np # for arrays
import matplotlib.pyplot as plt # to build the populated map
Big big thanks to Christoph Gohlke (Danke Dir Christoph !) who did all the wonderful job !
basemap‑1.2.0‑cp36‑cp36m‑win_amd64.whl
– Saritasarkaria