Install a Specific Python Version on Ubuntu
Stack How?
Stackorigin – The Community of Question and Answers Latest Articles
Read More About Python List Comprehension with examples
Python List Comprehension: Python List comprehension provides a much more short syntax for creating a new list based on the values of an existing list. Advantages of List Comprehension in Python: Time Efficient than loop Space Efficient than loop Needs ...
Do not accept an offer letter from companies.
Do not accept an offer letter from companies without verifying the following points. Designation Salary Details & CTC Distribution Leave Policies Working Hours & Days Medical Coverage/Insurance Probation Period Notice Period Benefits and Perks Bonus F&F Policy
How to call API using Ajax
AJAX stands for Asynchronous JavaScript and XML and its used for to make calls to the server to fetch some data. In this article, we will learn how to implement a simple API call using AJAX technology. How to use GET ...
Install a Specific Python Version on Ubuntu:
In this short tutorial, I will demonstrate how to install a spcific version of Python on Ubuntu Linux.
Update the apt repositories:
$ sudo apt update
Then install the required dependencies:
$ sudo apt install libssl-dev openssl wget build-essential zlib1g-dev -y
Head over to the Python Downloads section and select the version of your choice, in my case I will be using Python 3.8.13, once you have the download link, download it:
$ wget https://www.python.org/ftp/python/3.8.13/Python-3.8.13.tgz
Then extract the tarball:
$ tar -xvf Python-3.8.13.tgz
Once it completes, change to the directory:
$ cd Python-3.8.13
Compile and add –enable-optimizations flag as an argument:
$ ./configure --enable-optimizations
Run make and make install:
$ make $ sudo make install
Then we can test it by running:
python3 --version