Skip to content

Commit

Permalink
fix: search for python3 when attempting to locate python executable
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-makerx committed Mar 27, 2024
1 parent 56e46c9 commit abf5c09
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/puya/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,10 @@ def _get_python_executable() -> str | None:
logger.info(f"Found python prefix: {prefix}")
venv_paths = sysconfig.get_paths(vars={"base": prefix})

python_exe = shutil.which("python", path=venv_paths["scripts"])
for python in ("python3", "python"):
python_exe = shutil.which(python, path=venv_paths["scripts"])
if python_exe:
break
if python_exe:
logger.debug(f"Using python executable: {python_exe}")
else:
Expand Down

0 comments on commit abf5c09

Please sign in to comment.