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

[workspace] Create a virtual environment for MacOS Python deps. #21269

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion setup/mac/binary_distribution/install_prereqs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,9 @@ if ! command -v pip3.12 &>/dev/null; then
exit 2
fi

pip3.12 install --break-system-packages -r "${BASH_SOURCE%/*}/requirements.txt"
# Create a virtual environment to isolate the Drake Python depdendency tree
# from the system Python so we don't need to include --break-system-packages.
# For more info, read https://github.com/RobotLocomotion/drake/pull/21013#issuecomment-1970181733.
python3.12 -m venv "${HOME}/.drake_venv"
source "${HOME}/.drake_venv/bin/activate"
pip3.12 install -r "${BASH_SOURCE%/*}/requirements.txt"
9 changes: 7 additions & 2 deletions setup/mac/source_distribution/install_prereqs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,13 @@ if ! command -v pip3.12 &>/dev/null; then
exit 2
fi

pip3.12 install --break-system-packages -r "${BASH_SOURCE%/*}/requirements.txt"
# Create a virtual environment to isolate the Drake Python depdendency tree
# from the system Python so we don't need to include --break-system-packages.
# For more info, https://github.com/RobotLocomotion/drake/pull/21013#issuecomment-1970181733.
python3.12 -m venv "${HOME}/.drake_venv"
source "${HOME}/.drake_venv/bin/activate"
pip3.12 install -r "${BASH_SOURCE%/*}/requirements.txt"

if [[ "${with_test_only}" -eq 1 ]]; then
pip3.12 install --break-system-packages -r "${BASH_SOURCE%/*}/requirements-test-only.txt"
pip3.12 install -r "${BASH_SOURCE%/*}/requirements-test-only.txt"
fi