配置好Python3.6和pip3
安裝EPEL和IUS軟件源
yum install epel-release -y yum install https://centos7.iuscommunity.org/ius-release.rpm -y
安裝Python3.6
yum install python36u -y
創建python3連接符
ln -s /bin/python3.6 /bin/python3
安裝pip3
yum install python36u-pip -y
創建pip3鏈接符
ln -s /bin/pip3.6 /bin/pip3
記得 yum install python36u-devel -y
否則安裝pip3 install mysqlclient
會出現
_mysql.c:37:20: 致命錯誤:Python.h:沒有那個文件或目錄
#include "Python.h"
^
編譯中斷。
error: command 'gcc' failed with exit status 1