Skip to content

Commit 0ce222f

Browse files
authored
Merge pull request #79 from AdmGenSameer/copilot/fix-install-script-pipx-error
Fix pipx installation for distributions with externally-managed Python (PEP 668)
2 parents 525a53f + 7374a08 commit 0ce222f

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

install.sh

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,13 @@ fi
4747
# Step 2: Define essential system dependencies
4848
# ------------------------------
4949
if [ "$DISTRO" = "arch" ]; then
50-
DEPENDENCIES=(python python-pip git curl wget)
50+
DEPENDENCIES=(python python-pip python-pipx git curl wget)
5151
elif [ "$DISTRO" = "opensuse" ]; then
5252
# openSUSE includes venv in the base python3 package
53-
DEPENDENCIES=(python3 python3-pip git curl wget)
53+
DEPENDENCIES=(python3 python3-pip python3-pipx git curl wget)
5454
else
55-
DEPENDENCIES=(python3 python3-pip python3-venv git curl wget)
55+
# For Fedora, Ubuntu/Debian and other distros
56+
DEPENDENCIES=(python3 python3-pip python3-pipx python3-venv git curl wget)
5657
fi
5758

5859
install_package() {
@@ -87,14 +88,14 @@ for pkg in "${DEPENDENCIES[@]}"; do
8788
done
8889

8990
# ------------------------------
90-
# Step 5: Install pipx if missing
91+
# Step 5: Ensure pipx path is configured
9192
# ------------------------------
92-
if ! command -v pipx &> /dev/null; then
93-
echo "[*] Installing pipx..."
94-
python3 -m pip install --user pipx
95-
python3 -m pipx ensurepath
93+
if command -v pipx &> /dev/null; then
94+
echo "[*] pipx is installed. Ensuring PATH is configured..."
95+
pipx ensurepath
9696
else
97-
echo "[*] pipx is already installed."
97+
echo "[!] pipx installation failed. Please install it manually for your distribution."
98+
exit 1
9899
fi
99100

100101
# ------------------------------

0 commit comments

Comments
 (0)