-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdpinstall
More file actions
34 lines (28 loc) · 1.19 KB
/
dpinstall
File metadata and controls
34 lines (28 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env bash
echo "This script needs to install some packages as root, so please enter your password if prompted..."
echo "Installing system-level packages..."
echo "Updating apt first..."
yes | sudo apt-get update
echo "Installing packages..."
yes | sudo apt-get install python3 python3-tk python3-venv python3-dev python3-pip idle patchelf tar
# if ! command -v yes | sudo apt-get install python3.12 python3.12-tk python3.12-dev patchelf tar
# then
# echo "done"
# else
# echo "Command failed, probably because Deadsnakes PPA is not installed. Please add the deadsnakes PPA to continue."
# exit 1
# fi
# echo "Configuring symlinks..."
# sudo ln -sf $(which python3.12) /usr/bin/python3
# sudo ln -sf $(which python3.12) /usr/bin/python
echo "Configuring pip..."
sudo python3 -m ensurepip --upgrade
echo "Installing python packages with pip..."
if python3 -m pip install -r requirements.txt --break-system-packages
then
echo "Required python packages installed"
else
echo "Command failed, probably because this is running on python that comes from apt on Debian-based distros, running without --break-system-packages..."
python3 -m pip install -r requirements.txt
fi
echo "done"