Skip to content

Instantly share code, notes, and snippets.

@j40903272
Last active December 3, 2023 13:24
Show Gist options
  • Save j40903272/a4b715b79b2e5aa74342fe995a1c1ef9 to your computer and use it in GitHub Desktop.
Save j40903272/a4b715b79b2e5aa74342fe995a1c1ef9 to your computer and use it in GitHub Desktop.
Install python3.7

Install from apt

  1. setup
python3 -V
apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
apt update
  1. install python3.7
sudo apt install python3.7
python3.7 --version
  1. update-alternatives (change python3 to python3.7 binary)
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 2
sudo update-alternatives --config python3
  1. check
python3 -V
  1. install upgrade pip
python3.7 -m pip install pip

Install from source

  1. Install requirements
sudo apt-get install -y build-essential checkinstall libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev zlib1g-dev openssl libffi-dev python3-dev python3-setuptools wget
  1. Prepare to build
mkdir /tmp/Python37
cd /tmp/Python37
  1. Pull down Python 3.7, build, and install
wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tar.xz
tar xvf Python-3.7.0.tar.xz
cd /tmp/Python37/Python-3.7.0
./configure
sudo make altinstall
@anuraggoutam
Copy link

python3 -V
apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
apt update

@Akki10sorout
Copy link

wget https ://www.python.org/ftp/ptar xvf python -3.7.0.tar .xx cd /tmp/python 37/python-3.7.0./configure sudo make altinstall

@Jesus34000000000
Copy link

Quiero instalar sudo y python3 pero dice esto No superuser binary detected.
Are you rooted?

@rupeshpariyar
Copy link

I want to install from pkg

@rupeshpariyar
Copy link

But how

@Kamalabot
Copy link

Kamalabot commented Sep 11, 2023

python3 -V
apt update
sudo apt install software-properties-common
sudo apt install python3-launchpadlib (this is required for 6.4.0-kali3-amd64)
sudo add-apt-repository ppa:deadsnakes/ppa
apt update

Then the apt update fails for me... ;) with the below error

W: https://cli-assets.heroku.com/channels/stable/apt/./InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
E: The repository 'https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu kali-rolling Release' does not have a Release file.
N:Updating from such a repository can't be done securely, and is therefore disabled by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment