环境:vscode,
按官网运行如下代码:
import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap
m = Basemap()
m.drawcoastlines()
plt.show()
报错:
Traceback (most recent call last):
File "/Users/ddd/Desktop/map_01.py", line 5, in <module>
m = Basemap() # 使用Basemap()创建一个地图
File "/Users/ddd/opt/anaconda3/envs/py36/lib/python3.6/site-packages/mpl_toolkits/basemap/__init__.py", line 1122, in __init__
self._readboundarydata('gshhs',as_polygons=True)
File "/Users/ddd/opt/anaconda3/envs/py36/lib/python3.6/site-packages/mpl_toolkits/basemap/__init__.py", line 1229, in _readboundarydata
`conda install basemap-data-hires`.""")
TypeError: 'module' object is not callable