ubuntu安装uwsgi遇到的问题解决方案

uwsgi安装

ubuntu安装uwsgi遇到的问题

Command "/root/myenv/bin/python3.4 -c "import setuptools, tokenize;__file__='/tmp/pip-build-7cr2or3v/uwsgi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-omoei_c8-record/install-record.txt --single-version-externally-managed --compile --install-headers /root/myenv/include/site/python3.4/uwsgi" failed with error code 1 in /tmp/pip-build-7cr2or3v/uwsgi
(myenv)root@iZ94oziy87wZ:~# 

上面的问题不知道原因,也没有给我太多错误提示。

python-dev已经安装。

索性直接安装源码。

直接 下载源码安装 http://projects.unbit.it/downloads/uwsgi-latest.tar.gz

*** uWSGI compiling embedded plugins ***
[x86_64-linux-gnu-gcc -pthread] plugins/python/python_plugin.o
In file included from plugins/python/python_plugin.c:1:0:
plugins/python/uwsgi_python.h:2:20: fatal error: Python.h: No such file or directory
 #include <Python.h>
                    ^

这回算是知道问题在哪里了,Python.h

find /usr -name Pythond.h

只在Python2.7下面找到这个。

顿悟

apt-get install python3-dev

猜你喜欢

转载自my.oschina.net/u/3293292/blog/1813754