使用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完成
本文解决了一个关于使用Python 3.6安装uWSGI时出现的错误,即找不到Python.h文件的问题。通过查找pip安装目录并安装正确的Python-dev版本,最终成功安装了uWSGI。
256





