Skip to content

Commit

Permalink
Merge pull request #252 from FAIRDataPipeline/hotfix/windows_venv
Browse files Browse the repository at this point in the history
If python3.exe is not found windows should fall back to python.exe
  • Loading branch information
RyanJField committed Jun 26, 2022
2 parents fe174eb + cddab09 commit cbaadf1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fair/virtualenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ def ensure_directories(self, env_dir) -> SimpleNamespace:
_context: SimpleNamespace = super().ensure_directories(env_dir)
_python_exe = shutil.which("python3")
if not _python_exe:
raise PythonExecutableIdentificationError
self._logger.warning("python3.exe not found trying python.exe")
_python_exe = shutil.which("python")
if not _python_exe:
raise PythonExecutableIdentificationError

self._logger.debug(f"Using python '{_python_exe}' for setup")

Expand Down

0 comments on commit cbaadf1

Please sign in to comment.