Basemap library using Anaconda Jupyter Notebooks - KeyError: PROJ_LIB

后端 未结 5 503
情书的邮戳
情书的邮戳 2020-12-15 08:05

I\'m trying to install and import the Basemap library into my Jupyter Notebook, but this returns the following error:

KeyError: \'PROJ_LIB\'
<
5条回答
  •  时光取名叫无心
    2020-12-15 08:34

    If you can not locate epsg file at all, you can download it here:

    https://raw.githubusercontent.com/matplotlib/basemap/master/lib/mpl_toolkits/basemap/data/epsg

    And copy this file to your PATH, e.g. to:

    os.environ['PROJ_LIB'] = 'C:\Users\username\Anaconda3\pkgs\basemap-1.2.0-py37h4e5d7af_0\Lib\site-packages\mpl_toolkits\basemap\data\'

    This is the ONLY solution that worked for me on Windows 10 / Anaconda 3.

提交回复
热议问题