Subject: How to downgrade python3.12 to python 3.8 in Alpine 3.20.3?

From: Amey <[email-masked]>
Date: Mon, 16 Sep 2024 08:36:56 +0200

Hello,

My application requires python3.8 which was there in Alpine 3.12
I done the upgrade of Alpine from 3.12 to 3.20.3

Now my script breaks due to Python 3.12 in /usr/bin

apk del is unable to remove Python3.12

Any suggestions on how to achieve this? Thanks.

Regards,
Amey.

---

From: Amey <[email-masked]>
Date: Mon, 16 Sep 2024 09:06:15 +0200

Hello,

> Now my script breaks due to Python 3.12 in /usr/bin

I forgot to mention that I am managing my python env using venv with
python3.8 packages.

The new venv in my Alpine=

alpine-test-vm# virtualenv --version
virtualenv 20.26.2 from /usr/lib/python3.12/site-packages/virtualenv/__init__.py

---

From: Amey <[email-masked]>
Date: Mon, 16 Sep 2024 15:53:06 +0200

> virtualenv 20.26.2 from /usr/lib/python3.12/site-packages/virtualenv/__init__.py

Following commands helped me to install packages using pip =

==============================================
virtualenv venv
python3 -m venv /home/user1/app-updater/venv/
user1@alpine-test-vm:~/app-updater/venv/bin# source activate
pip install docker
pip install toml
pip install websocket-client
......
===============================================

After installing all required packages using pip, the script started working.

---

From: Stuart Longland VK4MSL <[email-masked]>
Date: Mon, 16 Sep 2024 17:09:47 +1000

> I done the upgrade of Alpine from 3.12 to 3.20.3

Wouldn't porting the application to Python 3.12 be a better solution?

I think to get Python 3.8 you'd have to download the sources and compile 
it by hand.  Trying to replace your system Python with 3.8 is asking for 
trouble.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
   ...it's backed up on a tape somewhere.