Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working with GMT 6.0.0rc1 #310

Closed
claudiodsf opened this issue Jun 19, 2019 · 7 comments · Fixed by #311
Closed

Not working with GMT 6.0.0rc1 #310

claudiodsf opened this issue Jun 19, 2019 · 7 comments · Fixed by #311

Comments

@claudiodsf
Copy link
Contributor

Hi, I just installed GMT 6.0.0rc1 on macOS through homebrew and pygmt from source, but when try importing pygmt, I get the following error:

GMTVersionError: Using an incompatible GMT version 6.0.0rc1. Must be newer than 6.0.0.
@welcome
Copy link

welcome bot commented Jun 19, 2019

👋 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.

@claudiodsf
Copy link
Contributor Author

The problem can be reduced to this:

>>> from packaging.version import Version
>>> Version('6.0.0rc1') < Version('6.0.0')
True

@claudiodsf
Copy link
Contributor Author

By the way, the error message should say:

Must be equal or newer than 6.0.0.

@seisman
Copy link
Member

seisman commented Jun 19, 2019

Yes, 6.0.0rc1 is a pre-release version. I think the solution is to change the required_version to 6.0.0rc1.

pygmt/pygmt/clib/session.py

Lines 114 to 115 in 997b88c

# The minimum version of GMT required
required_version = "6.0.0"

@claudiodsf
Copy link
Contributor Author

Yep, I agree.

@seisman
Copy link
Member

seisman commented Jun 19, 2019

Could you submit a PR?

@claudiodsf
Copy link
Contributor Author

Ok

leouieda pushed a commit that referenced this issue Jun 20, 2019
Update the required version check to match the release candidate.
Use the conda-forge provided packages when testing on CI and in the
conda environment.

Fixes #310
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants