买了个vps
系统之前是centos7,发现太素了,换成了ubuntu
ubuntu自带python3 以及python2
系统没有pip3
如提示,apt-get install python3-pip
即可装好pip3
然后指定安装django1.8.1版本
pip3 install django==1.8.1
即可
然后查看uwsgi
提示这样
选一个python3的版本
apt-get install uwsgi-plugin-python3
然后写个 test.py文件
#test.py
def application(env, start_response):
tart_response('200 ok', [('Content-Type','text/html')])
return [b'Hello Word']
注意 好多教程都是python2的,在python3里面是return [b"Hello word"]