Skip to content

Aklahara/PythonUpdater

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Updater for Ubuntu

This script updates all active releases of Python, even the pre-release ones. This is for people who likes building things from source because mental health is not a thing for you.

If you have a script that runs on an end of life Python version, it's best to find another repository that hasn't been abandoned for over 5 years.

For the change log please check CHANGELOG.md


Future Plan

Feel free to contribute your code, if anyone sees this at all.

  • Passing arguments such as ./main.sh 3.12 will check the specific version only

How does this work?

  1. Dependencies are either updated or installed. The list comes from the developer's guide of Python.
  2. Using wget, release information is extracted from the Python download and pre-release pages.
  3. Using a bunch of greps, a list of all releases is generated. The list is sorted with sort -Vr, so the newest version is head -n 1.
  4. Your python version is checked, if it does not exist, the version will be None.
  5. All active Python versions will be updated/installed based on that information.

Note: All python will be installed in /usr/local/bin so it doesn't interfere with the system's python3 (For noobs: Don't change the system python version, it breaks things).


Tutorial

For Ubuntu 24.04 or after:

First time only:

Go to Software and Updates and select Source Code under Ubuntu Software

Run:

sudo chmod +x main.sh
sudo chmod +x InstallPython.sh
./main.sh

To disable GIL and add JIT compiler for Python 3.13.0

./main.sh put_anything_here_im_too_burnt_out_to_fix_it

For Ubuntu 23.10 or before:

First time only:

sudo bash -c 'CODENAME=$(grep -oP "CODENAME=\K\w+" < /etc/lsb-release); echo "deb-src http://archive.ubuntu.com/ubuntu/ $CODENAME main restricted" >> /etc/apt/sources.list'

Optional:

sudo su  # Activate root if you don't want to type passwords

Run:

sudo chmod +x main.sh
sudo chmod +x InstallPython.sh
./main.sh

For Windows:

  1. Go to Windows app store
  2. Download your Python version
  3. UPDATE IT WITH THE UPDATE BUTTON

About

Ubuntu exclusive python updater for people not using LTS and those who enjoy building from source.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages