Closed weiji14 closed 3 years ago
Are you using a 32 bit Windows?
Can you check if c:/Users/username/.conda/envs/pygmt/Library/bin/gswin64c.exe or c:/Users/username/.conda/envs/pygmt/Library/bin/gswin32c.exe exist?
I'm on 64-bit Windows, and yes, both files exist and I can open them fine, so not sure why GMT isn't finding them
(pygmt) PS H:\github\pygmt> ls C:\Users\username\.conda\envs\pygmt\Library\bin\gswin*
Directory: C:\Users\username\.conda\envs\pygmt\Library\bin
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 9/11/2020 10:46 AM 102912 gswin64.exe
-a---- 9/11/2020 10:46 AM 92672 gswin64c.exe
@weiji14 Perhaps you can try to install the GMT dev version instead?
something with the
gmt
conda package not linking toghostscript
properly.
gmt
is not linked to ghostscript
. It simply tries to search for ghostscript
in Windows' registry or gswin64c
in PATH.
One of the workarounds may be installing Ghostscript using the official installer, which updates the Windows registry.
gmt
is not linked toghostscript
. It simply tries to search forghostscript
in Windows' registry orgswin64c
in PATH.One of the workarounds may be installing Ghostscript using the official installer, which updates the Windows registry.
Haven't got admin permissions on my university Windows system so changing the registry is not possible. But I'll try and install the dev version (i.e. conda install -c conda-forge/label/dev gmt
) and see if it works.
Edit: Nope, using GMT 6.2.0_e1b6a15_2021.02.02 still gives an error with using gswin64c.exe
This is not a PyGMT issue, and all PyGMT tests work well on Windows.
Close it? @weiji14
Ok, haven't had time to reproduce this properly. I'll close for now.
Description of the problem
Trying to save or show a figure results in an error with ghostscript (gs) not found with a fresh conda install on Windows 10. This is with following the installation instructions at https://github.com/GenericMappingTools/pygmt/blob/v0.2.1/CONTRIBUTING.md#setting-up-your-environment. Note sure if there's something wrong with the conda
gmt
package at https://github.com/conda-forge/gmt-feedstock?Full code that generated the error
Full error message
I've hit this issue a few times now since late last year, and had a friend who had a similar issue with not finding ghostscript last month, and I think the workaround he did was to manually download the ghostscript executable (gswin32.exe?) and place it at the right path. Not sure if it's a problem with our university's Windows system (we have funny network drives) or something with the
gmt
conda package not linking toghostscript
properly. This looks similar-ish to issue #393Edit: Might be an upstream
gmt
issue actually. Running pure GMT doesn't work either:System information
Please paste the output of
python -c "import pygmt; pygmt.show_versions()"
: