Improve the pygmt.show_versions() function #1830
Labels
maintenance
Boring but important stuff for the core devs
upstream
Bug or missing feature of upstream core GMT
Milestone
I build the GMT master branch from source code and install it to
/home/user/opt/GMT-master/
. It's the only GMT version installed on my computer.Here is the output of
pygmt.show_versions()
There are some issues here:
gmt: 6.4.0_434ed18_2022.03.11
is obtained by callinggmt --version
. However, when multiple GMT versions are installed, the commandgmt
and the librarylibgmt
may come from different GMT verisons. For example, if I have GMT 6.3 in my conda environment and GMT dev in another installation path, PyGMT may load the GMT 6.3 library but find GMT dev comman, or vice versa, depending on the settings of PATH and GMT_LIBRARY_PATH. It causes some confusion because PyGMT reports inconsistent GMT versions. I think we should remove thegmt: 6.4.0_434ed18_2022.03.11
information.binary dir: /home/user/opt/miniconda/bin
information comes from GMT'sAPI_BINDIR
parameter in libgmt. It's the path of the program that loads and call the libgmt library. So, for GMT CLI, it points to GMT's bin directory, but for PyGMT, it's the path of the python interpreter. So the information is useless and also cause some confusion. I think we should remove it too.The text was updated successfully, but these errors were encountered: