[root@minion-1 ~]# wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tgz
[root@minion-1 ~]#tar xf Python-3.6.5.tgz
[root@minion-1 ~]cd Python-3.6.5/ && ./configure --prefix=/usr/local/python36
[root@minion-1 Python-3.6.5]# make && make install
[root@minion-1 Python-3.6.5]# vi /etc/pip.conf
[global]
index-url = http://pypi.douban.com/simple
trusted-host= pypi.douban.com
[list]
format=columns
[root@minion-1 Python-3.6.5]# /usr/local/python36/bin/pip3 install virtualenv
[root@minion-1 python36]# /usr/local/python36/bin/virtualenv ./python36env
[root@minion-1 python36]# source python36env/bin/activate
[root@minion-1 python36]# pip install pymysql
[root@minion-1 python36]# pip list
Package Version
pip 19.0.3
PyMySQL 0.9.3
setuptools 40.8.0
wheel 0.33.1
(python36env)
[root@minion-1 python36]# vi /etc/my.cnf
[mysqld]
default-storage-engine =innodb
innodb_file_per_table
collation-server =utf8_general_ci
init-connect =‘SET NAMES utf8‘
character-set-server =utf8
原文地址:https://blog.51cto.com/popli3/2359330