標籤:
之前安裝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?7token
In file included from plugins/python/python_plugin.c:1:0:
plugins/python/uwsgi_python.h:2:20: 致命錯誤:Python.h:沒有那個檔案或目錄
在安裝uwsgi 以前,請確保libxml2,gcc,python-devel正確安裝
Python uwsgi 無法安裝以及編譯報錯的處理方式