Skip to content

Commit b2e65bc

Browse files
authored
fix: issue with Ansys Python installs (#119)
1 parent ee7a305 commit b2e65bc

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/ansys/tools/installer/find_python.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,14 @@ def _find_installed_ansys_python_win():
114114
f"commonfiles\\CPython\\{ansys_py_ver}\\winx64\\Release\\python",
115115
)
116116
if os.path.exists(path):
117-
version_output = subprocess.check_output(
118-
[f"{path}\\python.exe", "--version"], text=True
119-
).strip()
120117
try:
118+
version_output = subprocess.check_output(
119+
[f"{path}\\python.exe", "--version"], text=True
120+
).strip()
121121
version = version_output.split()[1]
122122
paths[path] = (version, False)
123-
except Exception:
123+
except Exception as err:
124+
LOG.error(f"Failed to retrieve Python version: {str(err)}")
124125
pass
125126

126127
return paths

0 commit comments

Comments
 (0)