I don't know that Tencent Cloud's centos is different from Alibaba Cloud's centos. Anyway, the Ubuntu systems of the two cloud platforms are different. If you follow the same tutorial, you will often fall into the pit.
Install some centos dependencies:
This step is very important. Many errors are often caused by the lack of this step.
yum install -y gcc zlib* openssl-devel openssl
install pip
wget https://bootstrap.pypa.io/get-pip.py --no-check-certificate
sudo python get-pip.py
Install python3.6
Obtain
wget https://www.python.org/ftp/python/3.6.3/Python-3.6.3.tgz tar -xzvf Python-3.6.3.tgz -C / tmp cd /tmp/Python-3.6.3/
Install
#Install python3.6 to the /usr/local directory./configure --prefix=/usr/ local make make altinstall
Change /usr/bin/python link
ln -s /usr/local/bin/python3.6 /usr/bin/python3