Skip to content

Instantly share code, notes, and snippets.

@meerzulee
Last active December 21, 2023 08:32
Show Gist options
  • Save meerzulee/6b65bfd81c59ff5ad0807bc747de0f59 to your computer and use it in GitHub Desktop.
Save meerzulee/6b65bfd81c59ff5ad0807bc747de0f59 to your computer and use it in GitHub Desktop.
auto install python
#!/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
#!/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