1,安装python3.6 和pip
sudo apt-get update
sudo apt-get install -y build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev
apt-get install -y ca-certificates
wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tar.xz
tar xf Python-3.6.5.tar.xz
cd Python-3.6.5
./configure
make
sudo make altinstall
cd ../
sudo rm -r Python-3.6.5
rm Python-3.6.5.tar.xz
sudo ln -s /usr/local/bin/pip3.6 /usr/bin/pip
sudo ln -s /usr/local/bin/python3.6 /usr/bin/python
2,再安装些python模块
pip install sqlalchemy
pip install bs4
sudo apt-get install -y libffi-dev
pip install pymysql
apt-get install -y libxml2-dev libxslt1-dev
pip install lxml