我在ubuntu 64位计算机上使用python 3.6。我还安装了anaconda 4.4.0。如何通过jupyter笔记本在anaconda中安装底图?
@@ Ken是正确的,您没有安装在Jupyter上。您可能需要按照https://github.com/matplotlib/basemap#install的安装指南进行操作。
这需要事先下载numpy和matplotlib,可通过在命令行界面上运行pip install numpy matplotlib
轻松完成。
完成后,您可以将代码放在Jupyter上。下面的示例取自http://basemaptutorial.readthedocs.io/en/latest/plotting_data.html。
map = Basemap(projection='ortho', lat_0=0, lon_0=0)
map.drawmapboundary(fill_color='aqua')
map.fillcontinents(color='coral', lake_color='aqua')
map.drawcoastlines()
x, y = map(0, 0)
map.plot(x, y, marker='D',color='m')
plt.show()
我刚刚安装了它,对我来说很好用。
您可以使用Anaconda Navigator直接安装它。请按照以下步骤操作:
以下3个步骤解决了我的问题: