Learn about Centmin Mod LEMP Stack today
Register Now

Beta Branch add addons/python_switch_el8.sh to manage Python versions in 140.00beta01

Discussion in 'Centmin Mod Github Commits' started by eva2000, Jul 24, 2024.

  1. eva2000

    eva2000 Administrator Staff Member

    53,223
    12,116
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,654
    Local Time:
    1:15 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    add addons/python_switch_el8.sh to manage Python versions in 140.00beta01

    - add addons/python_switch_el8.sh to manage default Python versions for EL8 operating systems default to Python 3.6 with options via App Stream modules to switch to Python 3.8 or 3.9. EL9 defaults to Python 3.9 with no options to switch versions. So below examples are for EL8 OSes AlmaLinux/Rocky Linux 8 only.

    Switch to Python 3.8 defaults

    Code (Text):
    /usr/local/src/centminmod/addons/python_switch_el8.sh --python38
    
    Detected AlmaLinux 8
    Switching to Python 3.8...
    Looking in links: /tmp/tmpijtzg56p
    Requirement already up-to-date: setuptools in /usr/lib/python3.8/site-packages (41.6.0)
    Requirement already up-to-date: pip in /usr/local/lib/python3.8/site-packages (24.1.2)
    Requirement already satisfied: pip in /usr/local/lib/python3.8/site-packages (24.1.2)
    Python version switched successfully.
    
    Python alternatives set
    python3                 manual  /usr/bin/python3.8
    unversioned-python      manual  /usr/bin/python3.8
    python                  manual  /usr/bin/unversioned-python
    pip                     manual  /usr/local/bin/pip3.8
    pip3                    manual  /usr/local/bin/pip3.8
    
    python3 --version
    Python 3.8.17
    python --version
    Python 3.8.17
    pip --version
    pip 24.1.2 from /usr/local/lib/python3.8/site-packages/pip (python 3.8)
    


    Switch to Python 3.9 defaults

    Code (Text):
    /usr/local/src/centminmod/addons/python_switch_el8.sh --python39
    
    Detected AlmaLinux 8
    Switching to Python 3.9...
    Looking in links: /tmp/tmp7avson5h
    Requirement already up-to-date: setuptools in /usr/lib/python3.9/site-packages (50.3.2)
    Requirement already up-to-date: pip in /usr/local/lib/python3.9/site-packages (24.1.2)
    Requirement already satisfied: pip in /usr/local/lib/python3.9/site-packages (24.1.2)
    Python version switched successfully.
    
    Python alternatives set
    python3                 manual  /usr/bin/python3.9
    unversioned-python      manual  /usr/bin/python3.9
    python                  manual  /usr/bin/unversioned-python
    pip                     manual  /usr/local/bin/pip3.9
    pip3                    manual  /usr/local/bin/pip3.9
    
    python3 --version
    Python 3.9.19
    python --version
    Python 3.9.19
    pip --version
    pip 24.1.2 from /usr/local/lib/python3.9/site-packages/pip (python 3.9)
    


    Switch back to Python 3.6 defaults

    Code (Text):
    /usr/local/src/centminmod/addons/python_switch_el8.sh --python36
    
    Detected AlmaLinux 8
    Switching to Python 3.6...
    Requirement already up-to-date: setuptools in /usr/lib/python3.6/site-packages
    Requirement already up-to-date: pip in /usr/local/lib/python3.6/site-packages
    Requirement already satisfied: pip in /usr/local/lib/python3.6/site-packages (21.3.1)
    Python version switched successfully.
    
    Python alternatives set
    python3                 manual  /usr/bin/python3.6
    unversioned-python      manual  /usr/bin/python3.6
    python                  manual  /usr/bin/unversioned-python
    pip                     manual  /usr/local/bin/pip3.6
    pip3                    manual  /usr/local/bin/pip3.6
    
    python3 --version
    Python 3.6.8
    python --version
    Python 3.6.8
    pip --version
    pip 21.3.1 from /usr/local/lib/python3.6/site-packages/pip (python 3.6)
    


    Continue reading...

    140.00beta01 branch