diff --git a/qcore/gmt.py b/qcore/gmt.py index b1c6d53d..04479e44 100644 --- a/qcore/gmt.py +++ b/qcore/gmt.py @@ -12,8 +12,7 @@ import math import os -from distutils.spawn import find_executable -from shutil import copyfile, move +from shutil import copyfile, move, which from subprocess import PIPE, Popen from sys import byteorder from time import time @@ -4279,7 +4278,7 @@ def png( create_dirs: allow creation of output directory if it does not exist """ png = True - if find_executable("gs") is None: + if shutil.which("gs") is None: print("GS not found, not creating PNG, copying PS to PNG location.") png = False