Install Python 3.x on Fedora CoreOS 41

Jbn1233
1 min readJan 11, 2025

--

rpm-ostree install still slow and also need to reboot:

rpm-ostree install -y --allow-inactive python3

this is another way and POC:

kubeadm@core01:~$ uname -a
Linux core01 6.11.11-300.fc41.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 18:38:25 UTC 2024 x86_64 GNU/Linux
kubeadm@core01:~$
kubeadm@core01:~$ cat /etc/redhat-release
Fedora release 41 (Forty One)
kubeadm@core01:~$
kubeadm@core01:~$ ls -l
total 4
-rwxr-xr-x 1 kubeadm kubeadm 287 Jan 11 09:56 install-py3.sh
kubeadm@core01:~$
kubeadm@core01:~$ cat install-py3.sh
#!/bin/bash
mkdir -p /opt/ansible
curl -s http://192.168.1.74:81/python3s-image.tar.gz | gunzip - | podman load
# or podman pull docker.io/python:3-slim
mount --bind $(podman image mount docker.io/python:3-slim) /opt/ansible
cd /opt/ansible/
cp -Rp usr/local/bin usr/local/lib /usr/local/.
cd
umount /opt/ansible
rm -rf /opt/ansible
podman rmi -a
echo "done."
kubeadm@core01:~$
kubeadm@core01:~$ sudo ./install-py3.sh
Getting image source signatures
Copying blob 1e544a3b4718 done |
Copying blob 79895f013059 done |
Copying blob 8b296f486960 done |
Copying blob c577aa29a353 done |
Copying config 52d207e2c0 done |
Writing manifest to image destination
Loaded image: docker.io/library/python:3-slim
done.
kubeadm@core01:~$
kubeadm@core01:~$ python -V
Python 3.13.1
kubeadm@core01:~$ python
Python 3.13.1 (main, Dec 24 2024, 22:26:13) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> exit

with image size ~40MB (compressed) this way is faster.

that’s all.

--

--

Jbn1233
Jbn1233

Written by Jbn1233

Very short and simple notes for CKA/SRE and may not works on your environment | jbn1233@gmail.com | Bangkok, Thailand |

No responses yet