Basemap imported BUT "TypeError: 'module' object is not callable"

Basemap imported BUT "TypeError: 'module' object is not callable"

尝试从这里在 Mac High Sierra 上重建地球绘图: https://jakevdp.github.io/PythonDataScienceHandbook/04.13-geographic-data-with-basemap.html

已通过 pip-3.7/macports 和以下安装底图和先决条件:

sudo pip-3.7 install https://github.com/matplotlib/basemap/archive/master.zip

尝试按照旧 post 恢复到 matlibplot==2.2:

import mpl_toolkits.basemap as Basemap
plt.figure(figsize=(8, 8))
m = Basemap(projection='ortho', resolution=None, lat_0=50, lon_0=-100)
m.bluemarble(scale=0.5);

错误:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-15-94e6d5b6740c> in <module>
      5 import mpl_toolkits.basemap as Basemap
      6 plt.figure(figsize=(8, 8))
----> 7 m = Basemap(projection='ortho', resolution=None, lat_0=50, lon_0=-100)
      8 m.bluemarble(scale=0.5);

TypeError: 'module' object is not callable

现在不确定从这里去哪里,因为看起来导入底图没问题,但是版本或其他什么不正确?也许调用是错误的?接下来我会检查一下,但非常欢迎任何指示。 73s C

如何将 baseman 导入为 from mpl_toolkits.basemap import Basemap