GenericMappingTools / pygmt

A Python interface for the Generic Mapping Tools.
https://www.pygmt.org
BSD 3-Clause "New" or "Revised" License
747 stars 216 forks source link

fail to install gmt 6.0.0 in windows 64bit #422

Closed ZhangHCFJEA closed 4 years ago

ZhangHCFJEA commented 4 years ago

Hi all, I try to use pygmt on my windows 64bit and I use "conda install gmt" and "pip install pygmt" installed pygmt package. But when I try to use it by "import pygmt" in python, I failed. I found the gmt version i installed is v5.4.5 and pygmt version is 0.0.1a, maybe that's the reason why I failed? And I donot know how to install gmt v6.0.0 and pygmt v0.1.0 ...... How to fix this. Thanks.

welcome[bot] commented 4 years ago

👋 Thanks for opening your first issue here! Please make sure you filled out the template with as much detail as possible. You might also want to take a look at our contributing guidelines and code of conduct.

weiji14 commented 4 years ago

Hi there,

It will be a bit tricky to get PyGMT working on Windows right now, you will need to follow the workaround mentioned at https://github.com/GenericMappingTools/pygmt/pull/313#issuecomment-612856869_ because the conda gmt package won't work with pygmt for some reason.

https://github.com/GenericMappingTools/pygmt/blob/905264e8e64438eb2442fb3fa530f87600115741/doc/install.rst#L44-L46

That said, I'm not sure why you got gmt=5.4.5 installed, maybe because you have other package conflicts in conda? You can upgrade using conda install -c conda-forge gmt=6.0.0 (though it still won't work with pygmt on Windows). If you can install it in WIndows Subsystem for Linux or build gmt from source and link it to pygmt, then that would work better.

We haven't released pygmt v0.1.0 yet on PyPI, just need to finalize #420 first! Ping @seisman / @leouieda, could we get the Zenodo DOI for pygmt set up please :smile:

ZhangHCFJEA commented 4 years ago

Thanks, Wei. @weiji14 I installed pygmt in my Mac and it works well, but cannot install in Windows, that confused me a lot. Anyway, I'll try your suggestions, thanks again.

seisman commented 4 years ago

The command conda install -c conda-forge gmt install GMT 6.0.0 on Linux, macOS and Windows. It's confirmed by our testbot. The GMT 5.4.5 you're getting is mostly because you have another old GMT installed, and PyGMT finds the old one, instead of the one from conda.

As for the PyGMT on Windows issue, it's already known bug still unfixed.

Closing the issue. Please feel free to reopen it if you still can't get the correct GMT version via conda.