我正在尝试安装basemap,使用以下命令看起来已经没有问题:
conda install -c conda-forge basemap
在Anaconda提示符中。然而,当我在我的Jupyter笔记本上输入这段代码时,
import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap
它显示了一个错误:
FileNotFoundError Traceback (most recent call last)
<ipython-input-2-4fc84cbcc854> in <module>()
1 import matplotlib.pyplot as plt
----> 2 from mpl_toolkits.basemap import Basemap
~\Documents\DataScience\data\lib\site-
packages\mpl_toolkits\basemap\__init__.py in <module>()
144
145 # create dictionary that maps epsg codes to Basemap kwargs.
--> 146 epsgf = open(os.path.join(pyproj.pyproj_datadir,'epsg'))
147 epsg_dict={}
148 for line in epsgf:
FileNotFoundError: [Errno 2] No such file or directory: 'epsg'