centos7下pip安裝Scrapy報錯

報錯內容:

src/twisted/test/raiser.c:4:20: fatal error: Python.h: No such file or directory
     #include "Python.h"
                        ^
    compilation terminated.
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-3izg023y/Twisted/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-qpycj4rt/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-3izg023y/Twisted/

解決方法:

yum install python36-devel

參考文獻:Centos pip 安裝uwsgi 報錯“fatal error: Python.h: No such file or directory”

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章