The implementation of launch_sherlock() in launcher.py references the environment variable AWP_ROOT251. This is not set by the installer on Linux. There needs to be a different implementation to grab the install directory path. No environment variables are set for the installer like they are on Windows, so the implementation must grab that directory in different way. A workaround is to set the environment up yourself "setenv AWP_ROOT251 /ansys/reg/ansys_inc/v251" for instance.
def _get_base_ansys():
supported_installed_versions = {
env_key: path
for env_key, path in os.environ.items()
if env_key.startswith("AWP_ROOT") and os.path.isdir(path)
}
def _get_sherlock_exe_path():
ansys_base = _get_base_ansys()
if not ansys_base:
return ""
if os.name == "nt":
sherlock_bin = os.path.join(ansys_base, "sherlock", "SherlockClient.exe")
else:
sherlock_bin = os.path.join(ansys_base, "sherlock", "runSherlock")
return sherlock_bin
π Steps to reproduce
Install pySherlock on any Linux box, and try to run launcher.launch_sherlock()
π Before submitting the issue
π Description of the bug
The implementation of launch_sherlock() in launcher.py references the environment variable AWP_ROOT251. This is not set by the installer on Linux. There needs to be a different implementation to grab the install directory path. No environment variables are set for the installer like they are on Windows, so the implementation must grab that directory in different way. A workaround is to set the environment up yourself "setenv AWP_ROOT251 /ansys/reg/ansys_inc/v251" for instance.
def _get_base_ansys(): supported_installed_versions = { env_key: path for env_key, path in os.environ.items() if env_key.startswith("AWP_ROOT") and os.path.isdir(path) }
def _get_sherlock_exe_path(): ansys_base = _get_base_ansys() if not ansys_base: return "" if os.name == "nt": sherlock_bin = os.path.join(ansys_base, "sherlock", "SherlockClient.exe") else: sherlock_bin = os.path.join(ansys_base, "sherlock", "runSherlock") return sherlock_bin
π Steps to reproduce
Install pySherlock on any Linux box, and try to run launcher.launch_sherlock()
π» Which operating system are you using?
Linux
π Which ANSYS version are you using?
Version 2025 R1 (25.1b20240718), build 20240718.2
π Which Python version are you using?
3.10
π¦ Installed packages