Last active
December 21, 2023 08:32
-
-
Save meerzulee/6b65bfd81c59ff5ad0807bc747de0f59 to your computer and use it in GitHub Desktop.
auto install python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Add deadsnakes PPA | |
add-apt-repository ppa:deadsnakes/ppa -y | |
# Install Python 3.10 and required packages | |
apt-get install -y --no-install-recommends python3.10 \ | |
python3.10-dev \ | |
python3.10-venv \ | |
python3-distutils-extra | |
# Create symbolic links for python3 and python | |
rm /usr/local/bin/python3 | |
rm /usr/local/bin/python | |
ln -s /usr/bin/python3.10 /usr/local/bin/python3 | |
ln -s /usr/bin/python3.10 /usr/local/bin/python | |
# Install pip using the get-pip.py script | |
curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10 | |
python -V | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Add deadsnakes PPA | |
add-apt-repository ppa:deadsnakes/ppa -y | |
# Install Python 3.10 and required packages | |
apt-get install -y --no-install-recommends python3.11 \ | |
python3.11-dev \ | |
python3.11-venv \ | |
python3-distutils-extra | |
# Create symbolic links for python3 and python | |
rm /usr/local/bin/python3 | |
rm /usr/local/bin/python | |
ln -s /usr/bin/python3.11 /usr/local/bin/python3 | |
ln -s /usr/bin/python3.11 /usr/local/bin/python | |
# Install pip using the get-pip.py script | |
curl -sS https://bootstrap.pypa.io/get-pip.py | python3.11 | |
python -V | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment