Focus on cloud service provider activities
Notes on website operation and maintenance

Ubuntu 18.04 Image official source code installation Python 3.8

At present, Python is one of the most widely used programming languages in the world. With its simple and easy to learn syntax, this language can be applied to many projects in a wide range of fields, and is suitable for users without program foundation to learn. Python can be used from simple crawlers to complex AI. At present, the Python version has reached 3.8. In this article, Lao Zuo needs to record the installation of Python 3.8 in the Ubuntu 18.04 image.

Generally, we can install it directly through apt, but we are not sure that the source of the default system is Python 3.8, and sometimes it may be a lower version, so the most safe way is to install it directly with the official source code.

 Ubuntu 18.04 Image Official Source Code Installation Python 3.8 - Page 1

First, update the source list and install component support

apt update -y
apt install wget build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev -y

Second, download the latest Python installation source code


The latest version here is 3.8.1. Considering the stability, Laozuo installed 3.8

Third, decompress, compile and install

tar -xf Python-3.8.0.tgz
cd Python-3.8.0
./configure --enable-optimizations

IV. Startup and installation

make -j 8
make altinstall

We start the build process first, and then install it directly. This process needs to wait for a while.

V. Check version

python3.8 --version

Enter the command and check whether it has been installed. If you see the version number, the installation is successful.

Domain name host preferential information push QQ group: six hundred and twenty-seven million seven hundred and seventy-five thousand four hundred and seventy-seven Get preferential promotion from merchants.
Like( zero )
Do not reprint without permission: Lao Zuo's Notes » Ubuntu 18.04 Image official source code installation Python 3.8

Scan the code to follow the official account

Get more news about webmaster circle!
Entrepreneurship, operation and new knowledge