25 nov 2025

kubuntu 25.10 python 3.12

problem
 25.10 comes with python3.13 system-wide. If we need 3..12 e.g. for setiastrosuitepro...

dual-boot Pop!_OS 24.04 - Kubuntu 25.10

what it does 

-I think- It puts python3.12 in /usr/local which is before /usr in the search path.
Inspiration from here

method

update
sudo apt update && sudo apt upgrade -y

install requirements
sudo apt install -y software-properties-common build-essential \ zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev \ libreadline-dev libffi-dev curl libsqlite3-dev wget llvm \ libbz2-dev tk-dev

build and install
mkdir -p ~/py3.12
cd py-3.12
wget https://www.python.org/ftp/python/3.12.12/Python-3.12.12.tgz
tar -xf Python-3.12.12.tgz
cd Python-3.12.12

./configure --enable-optimizations
make -j$(nproc)
sudo make altinstall


notes
we use altinstall to retain the system installed python3

check
python3.12 --version
Python 3.12.12

which python3.12
/usr/local/bin/python3.12

python3 --version
Python 3.13.7

python3 --version
Python 3.13.7

pyinstaller
So that pyinstaller can find the libraries, activate the venv, then before calling pyinstaller:
sudo ldco
nfig /usr/local/lib

No hay comentarios:

Publicar un comentario