本机的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