1.检查Ubuntu中是否有以下环境包,如果没有,请按如下步骤安装:
sudo apt-get install build-essential pythonx.x
sudo apt-get install pythonx.x-dev
有一点很重要,如果安装的python3.6 则需要安装python3.6-dev,不能安装3.5,否则会报错
ERROR: Command "/usr/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-inq13_70/uwsgi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-2tovolpd/install-record.txt --single-version-externally-managed --compile --install-headers /usr/bin/python3.6/uwsgi" failed with error code 1 in /tmp/pip-install-inq13_70/uwsgi/
2.安装uswgi
sudo pip install uwsgi