报错
raise GMTCLibNotFoundError("\n".join(error_msg))
pygmt.exceptions.GMTCLibNotFoundError: Error loading GMT shared library at 'gmt.dll'.
Could not find module 'gmt.dll' (or one of its dependencies). Try using the full path with constructor syntax.
Error loading GMT shared library at 'gmt_w64.dll'.
Could not find module 'gmt_w64.dll' (or one of its dependencies). Try using the full path with constructor syntax.
Error loading GMT shared library at 'gmt_w32.dll'.
Could not find module 'gmt_w32.dll' (or one of its dependencies). Try using the full path with constructor syntax.
GMT版本是0.6.1
所以pip也应该安装pip install pygmt==0.6.1
结果报错 File "D:\Python3\Anaconda3\lib\site-packages\pygmt\clib\session.py", line 189, in __enter__
raise GMTVersionError(
pygmt.exceptions.GMTVersionError: Using an incompatible GMT version 6.1.1. Must be equal or newer than 6.3.0.
参考链接
找到官网镜像下载地址
Index of /gmt/下的什么用不来,我下的下面这个链接的
Release 6.3.0 · GenericMappingTools/gmt · GitHub
安装后运行测试程序
import pygmt
fig = pygmt.Figure()
fig.basemap(region="g", projection="W15c", frame=True)
fig.coast(shorelines=True)
fig.show()
出图成功了