Skip to content

Commit

Permalink
Merge pull request #501 from m-1-k-3/install_ubuntu
Browse files Browse the repository at this point in the history
Another PIPv23 fix
  • Loading branch information
m-1-k-3 authored Feb 28, 2023
2 parents dd6ff48 + 79274f5 commit dd4a713
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions installer/helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,18 @@ print_pip_info() {

pip_install() {
local PIP_NAME="${1:-}"
local PIP_PARAMS=("$PIP_NAME")
local PIP_OPTS="${2:-}"
if [[ -n "$PIP_OPTS" ]]; then
local PIP_PARAMS+=("$PIP_OPTS")
fi

local PIP_VERS=""
PIP_VERS=$(pip3 -V | awk '{print $2}')
if [[ "$(version "$PIP_VERS")" -lt "$(version "23")" ]]; then
pip3 install "$PIP_NAME" "$PIP_OPTS"
else
pip3 install "$PIP_NAME" --break-system-packages "$PIP_OPTS"
if [[ "$(version "$PIP_VERS")" -ge "$(version "23")" ]]; then
PIP_PARAMS+=(--break-system-packages)
fi
pip3 install "${PIP_PARAMS[@]}"
}

# print_file_info a b c d e
Expand Down

0 comments on commit dd4a713

Please sign in to comment.