Fix pip error: This environment is externally managed on Debian 12 (#4153)

* add support for debian12:
- remove python lock which prevents pip from installing modules
- make admin home directory readable
This commit is contained in:
Michael Schmid 2023-09-20 04:24:04 -04:00 committed by GitHub
parent d033e5a7cf
commit ea41275b5d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -377,6 +377,11 @@ else
exit 1
fi
# remove any debian python protection from pip installing modules
if [ -f rm /usr/lib/python3.*/EXTERNALLY-MANAGED ]; then
rm /usr/lib/python3.*/EXTERNALLY-MANAGED
fi
# make sure /usr/bin/pip exists (and calls pip3 in Debian Buster)
update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1
# 1. libs (for global python scripts)