fixes for python upstream breaking us
authorIan Kelling <iank@fsf.org>
Thu, 17 Feb 2022 19:47:29 +0000 (14:47 -0500)
committerIan Kelling <iank@fsf.org>
Thu, 17 Feb 2022 19:47:29 +0000 (14:47 -0500)
pdt.sh

diff --git a/pdt.sh b/pdt.sh
index c97941ea7d963f1cbcbb9cd4da08040fdd131696..c0ea98a2053ff4127fd37232beef98462673a89b 100644 (file)
--- a/pdt.sh
+++ b/pdt.sh
@@ -190,15 +190,16 @@ pdt-setup() {
 
   if [[ ! -e ~/.local/bin/pip ]]; then
     tmp=$(mktemp)
-    wget -O$tmp https://bootstrap.pypa.io/get-pip.py
+    pyver=$(python3 --version | sed -r 's/.*(3\.[0-9]+).*/\1/')
+    echo fyi: detected pyver: $pyver. this should look something like 3.6
+    # the bootstrap script at https://bootstrap.pypa.io/get-pip.py requires 3.7+
+    # as I write this.
+    wget -O$tmp https://bootstrap.pypa.io/pip/$pyver/get-pip.py
     python3 $tmp --user
     hash -r
   fi
 
-
-  if [[ ! -e ~/.local/bin/virtualenv ]]; then
-    python3 -m pip install --user virtualenv
-  fi
+  python3 -m pip install --user -U virtualenv
 
   cd ~/src/rainbowstream
   python3 -m virtualenv -p python3 venv