之前安裝uwsgi的時候編譯一步有出錯,因為比較早,部分錯誤代碼已經找不到了,網上找了部分錯誤信息, 現把解決方式共享出來。
環境:CentOS release 6.4 Python 2.7.3
報類似下面的錯誤代碼,多半因為setuptools沒有安裝,安裝setuptools就好了
bash-3.2# python setup.py build Traceback (most recent call last): File "setup.py", line 6, in module from setuptools import setup ImportError: No module named setuptools
報類似下面的錯誤代碼,多半因為python-devel沒有正確安裝,重新安裝就好了
n file included from plugins/python/python_plugin.c:1: plugins/python/uwsgi_python.h:2:20: error: Python.h: No such file or directory plugins/python/uwsgi_python.h:4:25: error: frameobject.h: No such file or di rectory In file included from plugins/python/python_plugin.c:1: plugins/python/uwsgi_python.h:42: error: expected �1�7�1�7before �1�7�1�7token plugins/python/uwsgi_python.h:43: error: expected �1�7�1�7before �1�7�1�7tokenIn file included from plugins/python/python_plugin.c:1:0:
plugins/python/uwsgi_python.h:2:20: 致命錯誤:Python.h:沒有那個文件或目錄
在安裝uwsgi 以前,請確保libxml2,gcc,python-devel正確安裝