Reputation: 51
I have Ubuntu 18.04 and I upgraded the python version from 3.6 to 3.8. However the python version it installed was 3.8.0 and I want 3.8.3.
$ sudo python3 --version
Python 3.8.0
How do I upgrade to 3.8.3?
Upvotes: 5
Views: 18008
Reputation: 61
I had to upgrade my python package from 3.8.15 to 3.8.17 on ubuntu 22.04 LTS, for that I used the following steps (upgrading a specific python package from the source directly :
sudo apt update
sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev wget
cd /opt
OR Make a new directory to store the Python source files:
mkdir ./python && cd ./python
wget https://www.python.org/ftp/python/3.8.17/Python-3.8.17.tgz
tar -xvf Python-3.8.17.tgz
cd Python-3.8.17
./configure --enable-optimizations
sudo make install
After you've implemented these steps, check if Python was installed properly on your computer by typing python3 --version in the terminal it should now show 3.8.17.
Hope this helps! Thanks! All credits go to the following blog post from where I got and used this approach (here)
Upvotes: 0
Reputation: 843
Update python3 3.6
to python3 3.8
version
Steps:
python3 -V
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
apt-get update
apt list | grep python3.8
sudo apt-get install python3.8
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 2
sudo update-alternatives --config python3
python3 -V
Now you can see python3 updated with 3.8 version.
Upvotes: 2
Reputation: 32963
You can use the deadsnakes PPA to install it. The latest version for 18.04 is currently 3.8.3-1+bionic1.
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.8
However, you should make sure that python3
points to the system version of Python (i.e. 3.6), since different versions are not alternatives on Ubuntu, and that can break your system (examples 1, 2, 3). You'll need to use python3.8
to run Python 3.8 in the future.
Upvotes: 5
Reputation: 36
as the manual says, compile from source , since deb packaging is a bit behind actual releases
Upvotes: 1