+5 votes
77 views
How to Install the Latest Version of Python on Ubuntu

in Linux/Unix by (552k points)
reopened | 77 views

1 Answer

+3 votes
Best answer

How to install the latest version of Python on Ubuntu

Python is developed as an object-oriented programming language which has dynamic semantics making use of built-in high-level data structures, these can be used with dynamic writing so that application development is fully functional but without resorting to large codes, Python supports modules and packages which increases program modularity and code usability..

 

Python Features
We currently have version 3.11 of Python which offers us features such as:

 

  • This new version is about 10 to 60% faster than Python 3.10
  • TOML parsing support in the Standard Library
  • New -P command line option in environment variable
  • It is now possible to mark individual TypedDict elements as required or not required
  • Detailed error locations in traces
  • New modules have been added
  • faster cpython
  • Faster execution time
  • Python function calls online

 

 

 

In this tutorial TechnoWikis will explain how to install the latest version of Python on Ubuntu to enjoy this dynamic language.

 

To stay up to date, remember to subscribe to our YouTube channel!
SUBSCRIBE ON YOUTUBE

 

How to install the latest version of Python on Ubuntu

 

 

Step 1

We open the terminal and install the required PPA:
 sudo add-apt-repository ppa:deadsnakes/ppa 
image

 

Step 2

We enter the password and we will see the following.

 

Press the Enter key to install the PPA

 

image

 

 

Step 3

This PPA contains the latest Python versions packaged for Ubuntu which often cannot be installed automatically.

 

image

 

Step 4

We update the repository together with the system packages:
 sudo apt update 
image

 

step 5

We install Python 3.11 which is the most recent version using the following command:
 sudo apt install python3.11 
image

 

step 6

Enter the letter S to confirm:

 

image

 

step 7

We look at the Python binaries installed on Ubuntu:
 ls -l /usr/bin/python* 
image

 

step 8

We validate the Python version using one of the following commands:
 python -V python3 -V 
step 9

We see that it takes the default system version.

 

 

image

 

 

step 10

We access Python 3.11 with the command:
 python3.11 
step 11

We execute some line with the syntax:
 print("text"); 
step 12

Press Enter to see the line. We leave with "exit()" or “quit()”.

 

 

 

image

 

This is the entire process to install the latest version of Python on Ubuntu..

 


by (3.5m points)
edited

Related questions

+5 votes
1 answer
+4 votes
1 answer
asked Jul 14, 2020 in Android Tutorial by backtothefuture (552k points) | 299 views
+3 votes
1 answer
+5 votes
1 answer
asked May 3, 2023 in Python by backtothefuture (552k points) | 68 views
+4 votes
1 answer
Sponsored articles cost $40 per post. You can contact us via Feedback

Most popular questions within the last 30 days

10,659 questions
10,791 answers
510 comments
3 users