Skip to content

Commit

Permalink
fix: issue with Ansys Python installs (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
RobPasMue authored Jun 19, 2023
1 parent ee7a305 commit b2e65bc
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/ansys/tools/installer/find_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,14 @@ def _find_installed_ansys_python_win():
f"commonfiles\\CPython\\{ansys_py_ver}\\winx64\\Release\\python",
)
if os.path.exists(path):
version_output = subprocess.check_output(
[f"{path}\\python.exe", "--version"], text=True
).strip()
try:
version_output = subprocess.check_output(
[f"{path}\\python.exe", "--version"], text=True
).strip()
version = version_output.split()[1]
paths[path] = (version, False)
except Exception:
except Exception as err:
LOG.error(f"Failed to retrieve Python version: {str(err)}")
pass

return paths
Expand Down

0 comments on commit b2e65bc

Please sign in to comment.