Python uwsgi 無法安裝以及編譯報錯的處理方式


之前安裝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 �171�7before �171�7token 
plugins/python/uwsgi_python.h:43: error: expected �171�7before �171�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正確安裝


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM