Centos build python3.8 environment

Alibaba Cloud's lightweight server used here
Insert picture description here
wget https://www.python.org/ftp/python/3.8.1/Python-3.8.1.tgz
Insert picture description hereInsert picture description here
waits for the download to complete

tar -zxvf Python-3.8.1.tgz 

Insert picture description here

cd Python-3.8.1

Insert picture description here

Installation dependencies

yum -y install libffi-devel zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make

Insert picture description here
Check whether the current environment meets the installation requirements

./configure 

Insert picture description here

make && make install

Insert picture description here

环境变量修改
1. # vi ~/.bashrc
2. PATH=$PATH:/home/Python-3.8.1   (这里每人都不同,需要看一下自己python的路径在哪里决定,pwd命令可查看当前的本地路径)
3. export PATH
4. source ~/.bashrc

Insert picture description here
Insert picture description here
The construction is complete!

Next install pip

python -m pip install --upgrade pip --force-reinstall

Insert picture description here
Install django for
Insert picture description here
more information, see WeChat applet development

Guess you like

Origin blog.csdn.net/xulei1132562/article/details/113659770