使用python3.6安装uwsgi 老出错找不到 Python.h
plugins/python/uwsgi_python.h:2:20: fatal error: Python.h: No such file or directory compilation terminated.
网上搜了很多方法都没解决。仔细研究一番之后发现Python版本造成的,
首先找到pip安装目录,
$ pip install pip
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
Requirement already satisfied: pip in /usr/local/lib/python3.6/dist-packages (10.0.1)
发现是Python3.6
那么安装3.6的python-dev,大概几分钟
$ sudo apt-get install libpython3.6-dev
再次执行
$ pip install uwsgi
测试uwsgi是否安装成功完成
$ uwsgi --version
2.0.17
完成