Skip to content

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

Closed

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.

Activity

  1. welcome commented on Aug 3, 2022

    @welcome

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

  2. added this to the 0.8.0 milestone on Aug 4, 2022
  3. seisman commented on Aug 29, 2022

    @seisman
    Member

    @ericlindsey After PR #2076 and #2078, now it's possible to specify the ghostscript path in Figure.show() or Figure.savefig() by giving an argument like gs_path="/path/to/gs".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature request

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions