summaryrefslogtreecommitdiffstats
path: root/venv-trog.sh
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@klebos.com>2022-05-19 22:38:28 +0300
committerPhilip Sargent <philip.sargent@klebos.com>2022-05-19 22:38:28 +0300
commitbf6c6e56a6d7101587363ef6a9e2eab5e09587e4 (patch)
treef8aa40a5d6049056ec22cfb2a06c9a31d08d5a29 /venv-trog.sh
parentb259e43de2dbcad5fe0f846fe803606de7671856 (diff)
downloadtroggle-bf6c6e56a6d7101587363ef6a9e2eab5e09587e4.tar.gz
troggle-bf6c6e56a6d7101587363ef6a9e2eab5e09587e4.tar.bz2
troggle-bf6c6e56a6d7101587363ef6a9e2eab5e09587e4.zip
fixing to work with python3.10 on a machine where 3.9 is default
Diffstat (limited to 'venv-trog.sh')
-rw-r--r--venv-trog.sh16
1 files changed, 9 insertions, 7 deletions
diff --git a/venv-trog.sh b/venv-trog.sh
index 9c7eae8..7c10473 100644
--- a/venv-trog.sh
+++ b/venv-trog.sh
@@ -23,12 +23,14 @@ echo 'Run this in a terminal in the troggle directory: "bash venv-trog.sh"'
# On a clean debian 11 (bullseye) installation with Xfce & ssh,
# as debian does not install everything that ubuntu does, you need:
# sudo usermod -a -G sudo expo # to put expo in sudoers group, re-login required
-# sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.9 1
-# sudo apt install python3-pip
-# sudo apt install python3-venv
+# sudo apt install python3.10
+# sudo apt install python3.10-pip
+# sudo apt install python3.10-venv
+# sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.10 1
+#
# copy this file and requirements.txt into the directory above where you want to install the VENV
-VENAME=dj32 # python3.9 and django 3.2
+VENAME=p310 # python3.10 and django 3.2
if [ -d requirements.txt ]; then
echo "No requirements.txt found. Copy it from your most recent installation."
@@ -41,7 +43,7 @@ python --version
cd ..
if [ ! -d $VENAME ]; then
echo "### Creating venv $VENAME"
- sudo python -m venv $VENAME
+ python -m venv $VENAME
else
echo "/$VENAME/ already exists ! Delete it first."
exit 1
@@ -54,8 +56,8 @@ source bin/activate
echo "### Activated."
# update local version of pip, more recent than OS version
# debian bullseye installs pip 20.3.4 which barfs, we want >22.0.3
-echo "### installing later version of pip inside $VENAME"
-python -m pip install --upgrade pip
+#echo "### installing later version of pip inside $VENAME"
+#python -m pip install --upgrade pip
PIP=pip