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

GMTCLibNotFoundError after pip install #2510

Closed
veenstrajelmer opened this issue Apr 21, 2023 · 4 comments
Closed

GMTCLibNotFoundError after pip install #2510

veenstrajelmer opened this issue Apr 21, 2023 · 4 comments
Labels
question Further information is requested

Comments

@veenstrajelmer
Copy link

veenstrajelmer commented Apr 21, 2023

Description of the problem

After a pip install pygmt, running the test code snippet results in GMTCLibNotFoundError. I have read the https://www.pygmt.org/latest/install.html#finding-the-gmt-shared-library, but this libraries are nowhere to be found in the environment folder. I expect this would work when installing with conda, but I was actually looking for a pip-installable alternative for cartopy.

Minimal Complete Verifiable Example

import pygmt
pygmt.show_versions()

fig = pygmt.Figure()
fig.coast(region="g", frame=True, shorelines=1)
fig.show()

Full error message

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.

System information

The error above is raised also. Hope this helps:
Windows 10
Python 3.8
pygmt 0.9.0
@veenstrajelmer veenstrajelmer added the bug Something isn't working label Apr 21, 2023
@welcome
Copy link

welcome bot commented Apr 21, 2023

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

@seisman
Copy link
Member

seisman commented Apr 23, 2023

PyGMT relies on GMT, which is not a Python package and can't be installed via pip. Thus, if you use pip install pygmt, you still need to install GMT yourself, either by conda/mamba or use the official standalone installer (https://github.com/GenericMappingTools/gmt/releases/tag/6.4.0), which should also work.

@seisman seisman added question Further information is requested and removed bug Something isn't working labels Apr 23, 2023
@veenstrajelmer veenstrajelmer closed this as not planned Won't fix, can't repro, duplicate, stale Apr 23, 2023
@veenstrajelmer
Copy link
Author

I was under the impression that also non-python dependencies can be made pip installable. I know of packages with c++ dependencies that are correctly handled via wheels. But I am not experienced with it, so I cannot judge. At least for me it is not a convenient alternative to cartopy at the moment.

@weiji14
Copy link
Member

weiji14 commented Apr 23, 2023

I was under the impression that also non-python dependencies can be made pip installable. I know of packages with c++ dependencies that are correctly handled via wheels. But I am not experienced with it, so I cannot judge. At least for me it is not a convenient alternative to cartopy at the moment.

Yes it is possible to have C dependencies like GMT in the PyPI wheels for PyGMT, but it is rather complicated to do so, see the discussion at #1853.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants