36
loading...
This website collects cookies to deliver better user experience
python3 --version
python2 --version
sudo apt install -y python3.8
python3.8 --version
sudo apt install -y python3.9
python3.9 --version
sudo apt update
sudo apt install -y build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev wget libbz2-dev
build-essential
Read more...
zlib1g-dev
Read more...
libncurses5-dev
Read more...
libgdbm-dev
Read more...
libnss3-dev
Read more...
libssl-dev
Read more...
libreadline-dev
Read more...
libffi-dev
Read more...
libsqlite3-dev
Read more...
wget
Read more...
libbz2-dev
Read more...
wget
which we have installed in previous command. To download using wget
, paste the following command in the terminal to download Python in the computer.wget https://www.python.org/ftp/python/3.10.1/Python-3.10.1.tgz
tar
.tar -xf Python-3.10.*.tgz
cd
command. The next commands will be run inside this directory.cd Python-3.10.1
./configure --enable-optimizations
configure
script is in charge of making the software ready to build on your individual system.--enable-optimizations
sets the default make targets up to enable Profile Guided Optimization (PGO) and may be used to auto-enable Link Time Optimization (LTO).Referencemake -j 4
nproc
make
.altinstall
ensures that other already installed versions of Python are not overwritten as it would have been the case if install
is used in place of it.sudo make altinstall
python3.10 --version
software-properties-common
dependency using the following.sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
apt install
sudo apt install -y python3.10
python3.10 --version
whereis python3.10