Skip to content

Add "-G" flag passthrough to psconvert for finding the correct gs version #2038

@ericlindsey

Description

@ericlindsey

As discussed here, if an old version of gs installed on Windows is referred to in the registry, psconvert will use the old gs instead of any newer versions that might be referred to in the path (psconvert checks the registry only and not the path).

This leads to an error in pygmt.show() if the gs in the registry is too old; currently there is no way to point pygmt.show() to a newer version except by adding the path to the newer version into the registry.

However, pygmt.show_versions() is able to find a newer version of gs referred to in the path, for example if both have been installed through conda. A suggested workaround is to enable pygmt.show() and pygmt.savefig() to use the same method to determine that path to gs, and pass it on to psconvert via the -G flag.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions