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 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 Install third-party libraries through Douban mirror according to the specified versionpython38 -m pip install tensorflow==1.15.0 -i

copyright notice
author[And listen - wind and rain],Please bring the original link to reprint, thank you.

Random recommended