Error importing basemap in spyder

I am trying to import a basemap into spyder on a windows machine (64 bit, Python34), but I am getting the following error:

from mpl_toolkits.basemap import Basemap
Traceback (most recent call last):

  File "<ipython-input-6-5e6824321d57>", line 1, in <module>
    from mpl_toolkits.basemap import Basemap

ImportError: No module named 'mpl_toolkits.basemap'

I am very puzzled because I can easily import it into Python IDLE. I just can't import it into Spyder. Anyone have any suggestions? Thanks in advance.

+4
source share
1 answer

I ran into the same problem. In my case basemapit was not included in mpl_toolkits. Here you should find a folder with the name basemap: ...\Python\python-3.4.4\Lib\site-packages\mpl_toolkits\ If not, you can download the basemap package from this repository and install it usingpython -m pip install packagename

0
source

Source: https://habr.com/ru/post/1589294/


All Articles