Basemap import error in PyCharm — KeyError: 'PROJ_LIB'

前端 未结 9 599
生来不讨喜
生来不讨喜 2020-11-30 02:27

I tried to use Basemap package to plot a map by PyCharm, but I got something wrong with

from mpl_toolkits.basemap import Basemap`

And the T

9条回答
  •  感动是毒
    2020-11-30 02:57

    This seems to be a common issue. There are several bug reports about it

    • basemap/issues/419,
    • https://github.com/matplotlib/basemap/issues/428
    • basemap/issues/428

    I had run into this error myself, and for me the solution was to uninstall basemap 1.2, then install basemap 1.1 from an old wheel file I still had lying around and then install basemap 1.2 again. I honestly have no idea why that worked though.

    Also from those issues above there are all kinds of other solutions that people have reported to work for them. Hopefully one of them fits here as well.

提交回复
热议问题