Skip to content

Commit 33a3942

Browse files
committed
Fix PEP 668 externally-managed-environment error on macOS
Add --user flag to all pip install commands on macOS to comply with PEP 668 restrictions in Python 3.12+. This installs sympy to the user directory instead of system-wide, which is allowed and safe.
1 parent a253767 commit 33a3942

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/actions/install-dependencies/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ runs:
2525
# brew install gmp
2626
# brew install python
2727
if command -v pip3 &> /dev/null; then
28-
pip3 install sympy
28+
pip3 install --user sympy
2929
elif python3 -m pip --version &> /dev/null; then
30-
python3 -m pip install sympy
30+
python3 -m pip install --user sympy
3131
else
3232
python3 -m ensurepip --upgrade || python3 -m ensurepip
33-
python3 -m pip install sympy
33+
python3 -m pip install --user sympy
3434
fi
3535
echo "Install Mac dependencies [DONE]"

0 commit comments

Comments
 (0)