在virtualenv中使用python3.6安装uwsgi时,老是提示找不到 Python.h
plugins/python/uwsgi_python.h:2:10: fatal error: Python.h: 没有那个文件或目录
#include <Python.h>
^~~~~~~~~~
安装完python-dev,python3-dev还是不行,而且python3.5可以正常安装uwsgi,
`locate Python.h`可以发现python2.7和python3.5都有这个文件,都在/usr/include下面。
直接用`cp -r /usr/include/python3.5m /usr/include/python3.6m`再install uwsgi则是报“/usr/bin/ld: 找不到 -lpython3.6m”的错误。
本来已经打算下载uwsgi的源码包下来本地安装了,幸好看了这篇博客:http://eminzhang.blog.51cto.com/5292425/1285705/
然后一个命令就搞定了:
sudo apt-get install libpython3.6-dev
再重新
pip install uwsgi
发现装上了。。。