Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Registry install on windows #257

Merged
merged 1 commit into from
Aug 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 3 additions & 5 deletions fair/virtualenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import logging
import os
import shutil
import sys
from types import SimpleNamespace
from venv import EnvBuilder

Expand All @@ -32,12 +33,9 @@ def __init__(self, *args, **kwargs) -> None:
def ensure_directories(self, env_dir) -> SimpleNamespace:
self._logger.debug(f"Creating virtual environment in '{env_dir}'")
_context: SimpleNamespace = super().ensure_directories(env_dir)
_python_exe = shutil.which("python3")
_python_exe = sys.executable
if not _python_exe:
self._logger.warning("python3.exe not found trying python.exe")
_python_exe = shutil.which("python")
if not _python_exe:
raise PythonExecutableIdentificationError
raise PythonExecutableIdentificationError

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

Expand Down