current position:Home>Install python3.8.9 in Linux environment

Install python3.8.9 in Linux environment

2022-11-08 06:32:43And listen - wind and rain

First, install related dependencies

yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel

Second, download python3.8.9 installation on the official website

# Download the python3.8.9 installation package on the official websitewget https://www.python.org/ftp/python/3.8.9/Python-3.8.9.tgz# Create installation directorysudo mkdir -p /usr/local/python3# Unzip the python installation packagetar -zxvf Python-3.8.9.tgz# Enter the decompressed directorycd Python-3.8.9# Configure the installation directory./configure --prefix=/usr/local/python3# to install pythonsudo make install# Establish soft connectionsudo ln -s /usr/local/python3/bin/python3.8 /usr/local/bin/python38sudo ln -s /usr/local/python3/bin/pip3.8 /usr/bin/pip3

Third, verify the installation

python38pip3 -V

The following means the installation is successful

Fourth, establish a connection to the idle integrated development environment

sudo ln -s /usr/local/python3/bin/idle3.8 /usr/local/bin/idle3.8

V. Mirror installation of third-party packages

# Install third-party libraries through Douban mirrorpython38 -m pip install numpy -i https://pypi.douban.com/simple# Install third-party libraries through Douban mirror according to the specified versionpython38 -m pip install tensorflow==1.15.0 -i https://pypi.douban.com/simple

copyright notice
author[And listen - wind and rain],Please bring the original link to reprint, thank you.
https://en.pythonmana.com/2022/312/202211080628290543.html

Random recommended