CentOS7 설치 twisted 오류: src/twisted/test/raiser.c:4:20: fatal error: Python.h : No such file or direc

질문: CentOS7 설치 twisted 오류:
    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/python -u -c "import setuptools, tokeni
ze;__file__='/tmp/pip-install-xueL0r/twisted/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r
'
, '
'
);f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-7ZoA5z/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-xueL0r/twisted/

해결 방안: 1,python-dev 설치
[root@bogon python]# yum install python-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.sohu.com

2, 설치 twisted
[root@bogon python]# pip install twisted

좋은 웹페이지 즐겨찾기