Make the script executable: Make the script executable using the chmod command:
chmod +x install_latest_python.sh
Run the script: Execute the script:
./install_latest_python.sh
This will automatically install the latest Python version (as per the specified PYTHON_VERSION in the script) and pip. Modify PYTHON_VERSION=3.11 to the specific version you want, such as 3.12 if necessary.