Python 3.9 Offline Installation Tutorial on Linux: Easily install the latest version of Python without an Internet connection!

Image [1] - Python 3.9 Offline Installation Tutorial on Linux: Easily install the latest version of Python without an internet connection!

When there is no Internet connection on your Linux system or you wish to install offline, you can install Python version 3.9 by following these steps.

Step 1: Download Python 3.9 Source Code

On any machine with an Internet connection, using a browser or command line, go to the official Python website (https://www.python.org/downloads/source/) and download Python The source code zip for 3.9 (.tar.xz or .tar.gz format).

Step 2: Transfer Python 3.9 Source Code to Linux System

Transfer the downloaded Python 3.9 source code zip package to the target Linux system, which can be transferred to the target system via USB device, network share, SCP and so on.

Step 3: Unzip Python 3.9 Source Code

To extract the Python 3.9 source tarball on a Linux system, use the following command:

bashCopy code
tar -xJf Python-3.9.5.tar.xz # If downloading in .tar.xz format
tar -xJf Python-3.9.5.tar.xz # If downloading in .tar.xz format
tar -xJf Python-3.9.5.tar.xz # If downloading in .tar.xz format

maybe

bashCopy code
tar -xzf Python-3.9.5.tar.gz # If downloading in .tar.gz format
tar -xzf Python-3.9.5.tar.gz # If downloading in .tar.gz format
tar -xzf Python-3.9.5.tar.gz # If downloading in .tar.gz format

The above command will extract the Python 3.9 source code to the current directory.

Step 4: Installation of compilation tools and dependent libraries

Before compiling and installing Python 3.9, you need to install some compilation tools and dependent libraries. These tools and libraries can be installed on a Linux system using the following commands:

bashCopy code
sudo apt update # update package list
sudo apt install build-essential libssl-dev zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libsqlite3-dev libreadline-dev libffi-dev curl # Installation of compilation tools and dependencies
sudo apt update # update package list
sudo apt install build-essential libssl-dev zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libsqlite3-dev libreadline-dev libffi-dev curl # Installation of compilation tools and dependencies
sudo apt update # update package list sudo apt install build-essential libssl-dev zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libsqlite3-dev libreadline-dev libffi-dev curl # Installation of compilation tools and dependencies

The above command uses the apt package manager for Debian/Ubuntu based Linux distributions. For other distributions, the tools and libraries can be installed using the appropriate package managers.

Step 5: Compile and Install Python 3.9

In the unzipped Python 3.9 folder, execute the following command to install Python 3.9:

goCopy code
. /configure
sudo make install
sudo make install
. /configure
sudo make install
sudo make install
. /configure sudo make install sudo make install

The above commands will perform the configuration, compilation and installation of Python 3.9.. /configurecommand to configure Python 3.9.makecommand to compile the source code.sudo make installcommand to install Python 3.9 into the system directory.

Step 6: Verify Installation

Once the installation is complete, you can verify that Python 3.9 was successfully installed using the following command:

cssCopy code
python3.9 --version
python3.9 --version
python3.9 --version

If the output shows the version number of Python 3.9.x, the installation was successful.

Python 3.9 has now been successfully installed offline on Linux systems. You can install Python 3.9 offline using thepython3.9command to start the Python 3.9 interpreter and begin developing with it.


Contact Us
Can't read the article? Contact us for free answers! Free help for personal, small business sites!
Tel: 020-2206-9892
QQ咨询:1025174874
(iii) E-mail: info@361sale.com
Working hours: Monday to Friday, 9:30-18:30, holidays off
© Reprint statement
This article was written by Harry
THE END
If you like it, support it.
kudos0 share (joys, benefits, privileges etc) with others
commentaries sofa-buying

Please log in to post a comment

    No comments