- setup
python3 -V
apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
apt update
- install python3.7
sudo apt install python3.7
python3.7 --version
- 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
- check
- install upgrade pip
python3.7 -m pip install pip
- 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
- Prepare to build
mkdir /tmp/Python37
cd /tmp/Python37
- 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
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.