本機的python版本爲2.7.6,在網上看到的解決方法有如下:
直接安裝pip install uwsgi會報錯如下:
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_aa/uwsgi/setup.py';
exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))
" install --record /tmp/pip-mjkYEB-record/install-record.txt --single-version-externally-managed --comp
ile failed with error code 1 in /tmp/pip_build_aa/uwsgi
Storing debug log for failure in /home/aa/.pip/pip.log
需要安裝開發包python-dev。
做了如下嘗試
sudo apt-get install libssl-dev libffi-dev python-dev build-essential libxml2-dev libxslt1-dev
安裝依然出錯,不確定這步是否需要。
然後嘗試瞭如下方法,正確安裝:
sudo apt-get install python-dev
sudo pip install uwsgi