pip3 install --upgrade virtualenv

cd /path/to/your/project
virtualenv --system-site-packages .
source ./bin/activate  


pip3 install --upgrade tensorflow


deactivate          # 退出当前工作环境
sudo apt-get install libpython-all-dev
# python
#sudo apt-get install libpython3-all-dev

sudo apt-get install libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk
sudo pip install pillow
sudo pip install icon_font_to_png

参考