diff --git a/pytensor/configdefaults.py b/pytensor/configdefaults.py index 0353c58fcd..a81fd63905 100644 --- a/pytensor/configdefaults.py +++ b/pytensor/configdefaults.py @@ -3,13 +3,13 @@ import os import platform import re +import shutil import socket import sys import textwrap from pathlib import Path import numpy as np -from setuptools._distutils.spawn import find_executable import pytensor from pytensor.configparser import ( @@ -349,7 +349,7 @@ def add_compile_configvars(): # Try to find the full compiler path from the name if param != "": - newp = find_executable(param) + newp = shutil.which(param) if newp is not None: param = newp del newp