diff --git a/images/ubuntu/scripts/build/install-python.sh b/images/ubuntu/scripts/build/install-python.sh index d88945e30..83ae51875 100644 --- a/images/ubuntu/scripts/build/install-python.sh +++ b/images/ubuntu/scripts/build/install-python.sh @@ -12,24 +12,22 @@ source $HELPER_SCRIPTS/os.sh # Install Python, Python 3, pip, pip3 apt-get install --no-install-recommends python3 python3-dev python3-pip python3-venv -# Install pipx -# Set pipx custom directory -export PIPX_BIN_DIR=/opt/pipx_bin -export PIPX_HOME=/opt/pipx if is_ubuntu24; then - apt-get install --no-install-recommends pipx - pipx ensurepath - # Create temporary workaround to allow user to continue using pip sudo cat < /etc/pip.conf [global] break-system-packages = true EOF - -else - python3 -m pip install pipx - python3 -m pipx ensurepath fi + +# Install pipx +# Set pipx custom directory +export PIPX_BIN_DIR=/opt/pipx_bin +export PIPX_HOME=/opt/pipx + +python3 -m pip install pipx +python3 -m pipx ensurepath + # Update /etc/environment set_etc_environment_variable "PIPX_BIN_DIR" $PIPX_BIN_DIR set_etc_environment_variable "PIPX_HOME" $PIPX_HOME