При установке базовой карты я получил «уже готовый» код:
Requirement already satisfied: basemap in c:\users\paisa\anaconda3\lib\site-packages (1.2.1)
Requirement already satisfied: pyproj>=1.9.3 in c:\users\paisa\anaconda3\lib\site-packages (from
basemap) (1.9.6)
Requirement already satisfied: matplotlib!=3.0.1,>=1.0.0 in c:\users\paisa\anaconda3\lib\site-
packages (from basemap) (3.2.0)
Requirement already satisfied: six in c:\users\paisa\anaconda3\lib\site-packages (from basemap)
(1.12.0)
Requirement already satisfied: pyshp>=1.2.0 in c:\users\paisa\anaconda3\lib\site-packages (from
basemap) (2.1.0)
Requirement already satisfied: numpy>=1.2.1 in c:\users\paisa\anaconda3\lib\site-packages (from
basemap) (1.18.1)
Requirement already satisfied: python-dateutil>=2.1 in c:\users\paisa\anaconda3\lib\site-packages
(from matplotlib!=3.0.1,>=1.0.0->basemap) (2.8.0)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\users\paisa\anaconda3\lib\site-packages
(from matplotlib!=3.0.1,>=1.0.0->basemap) (1.1.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in
c:\users\paisa\anaconda3\lib\site-packages (from matplotlib!=3.0.1,>=1.0.0->basemap) (2.4.2)
Requirement already satisfied: cycler>=0.10 in c:\users\paisa\anaconda3\lib\site-packages (from
matplotlib!=3.0.1,>=1.0.0->basemap) (0.10.0)
Requirement already satisfied: setuptools in c:\users\paisa\anaconda3\lib\site-packages (from
kiwisolver>=1.0.1->matplotlib!=3.0.1,>=1.0.0->basemap) (46.0.0)
Но когда я хочу импортировать его, я получаю следующую ошибку
KeyError Traceback (most recent call last)
in
2 import numpy as np
3 import matplotlib.pyplot as plt
----> 4 from mpl_toolkits.basemap import Basemap
~\Anaconda3\lib\site-packages\mpl_toolkits\basemap_init_.py in
150
151 # create dictionary that maps epsg codes to Basemap kwargs.
--> 152 pyproj_datadir = os.environ['PROJ_LIB']
153 epsgf = open(os.path.join(pyproj_datadir,'epsg'))
154 epsg_dict={}
~\Anaconda3\lib\os.py in getitem(self, key)
676 except KeyError:
677 # raise KeyError with the original key value
--> 678 raise KeyError(key) from None
679 return self.decodevalue(value)
"680
KeyError: 'PROJ_LIB'
Я сделал несколько Google исследования и, видимо, есть проблема с версией библиотеки. Как я могу это исправить?