Skip to content

Commit

Permalink
fix bug where pip still tries to the wrong site-packages
Browse files Browse the repository at this point in the history
  • Loading branch information
delan committed Dec 7, 2023
1 parent 6948ebc commit 71872cb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/mach_bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ def _activate_virtualenv(topdir):
sys.real_prefix = sys.prefix
sys.prefix = virtualenv_path

# Use the python in our venv for subprocesses, not the python we were originally run with.
# Otherwise pip may still try to write to the wrong site-packages directory.
python = os.path.join(venv_script_path, "python")

# TODO: Right now, we iteratively install all the requirements by invoking
# `pip install` each time. If it were the case that there were conflicting
# requirements, we wouldn't know about them. Once
Expand Down

0 comments on commit 71872cb

Please sign in to comment.