Answer the question
In order to leave comments, you need to log in
How to install Python 3.7 on Ubuntu?
Hello, the question arose of how best to install Python 3.7, pip on Ubuntu (16.04) and possibly separate it all from the system. Until today, I have used everything from the office. repositories. And then constantly something broke, for example, when updating Pip for example. (This is probably my hands are not from the same place). I tried to find something detailed on the Internet, but I did not find something sensible.
Answer the question
In order to leave comments, you need to log in
#apt update && apt upgrade -y
Next, we put all the dependencies
#apt install build-essential -y
#apt install libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev -y
#cd /usr/src
#wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz
#tar -xzvf Python-3.7.0.tgz
#cd Python-3.7.0
#./configure --enable-optimizations
#make altinstall
Note if Debian is installed - it does not support Python 3.7 out of the box, as it is not stable.
do this:
$ sudo nano /etc/apt/sources.list
# add
deb ftp.de.debian.org/debian testing main
$ echo 'APT::Default-Release "stable";' | sudo tee -a /etc/apt/apt.conf.d/00local
$ sudo apt-get update
$ sudo apt-get -t testing install python3.7
$ python3.7 -V
## which - search for
which python3 is installed. 7
## alias
alias python=/usr/bin/python3.7
in ubuntu
apt install python3.7
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question