Last update at :2024-06-14,Edit by888u
Nowadays, many of our application software and programs need to support the Python language, some of which our programs must be compatible with, and some of which we need to support when debugging crawler scripts. In this article, Snail needs to install the Python 3.9 environment separately on Ubuntu 20.04, so I will record this process, and then I will no longer record it when debugging the software.
First, install the necessary packages
sudo apt updatesudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev wget libbz2-dev
Second, download the latest software package
cd /optsudo wget https://www.python.org/ftp/python/3.9.0/Python-3.9.0.tgz
Here we download the latest 3.9 package version.
tar xzf Python-3.9.0.tgzcd Python-3.9.0sudo ./configure –enable-optimizations
Third, installation process
sudo make altinstall
Here we install it, and then we can check whether the version is python3.9.
Of course, the above is the official Python installation package that we use directly. We can also compile it directly on UbUNTU.
sudo apt updatesudo apt install software-properties-common
Install the required sources and then we add the package to the list.
sudo add-apt-repository ppa:deadsnakes/ppa
We need to press Enter during the process.
Then we install it directly
sudo apt install python3.9
Then we check the version.
python3.9 –version
We can choose server source installation or directly download the Python software package for installation.
Software-related articles about Python:
1. How to install Python 3.9 version on Ubuntu and install numpy and pandas libraries
2. Install Python3.8 from the official source code of Ubuntu18.04 image
3. CentOS8 official version system release and experience supports Python3.6 by default
4. CentOS7 system installs Python3.6.2 and coexists with Python2.7.5
Recommended site searches: Taiwan host, Mainland China registration-free CDN, rental high-defense IP, dynamic Mainland China IP agent, Tencent cloud server, foreign trade space, website space provider, Dongguan server rental, cloud server rental, how to query domain name registration No.,
发表评论