无法安装flask-socketio

时间:2015-10-11 13:10:50

标签: python python-2.7 flask pip flask-socketio

我正在尝试使用pip安装Flask-socketIO:

 pip install flask-socketIO 

但最后我遇到了这个错误:

   cc -O2 -fPIC -Wimplicit -DLIBEV_EMBED=1 -DEV_COMMON= -DEV_CLEANUP_ENABLE=0 -DEV_EMBED_ENABLE=0 -DEV_PERIODIC_ENABLE=0 -Ibuild/temp.linux-x86_64-2.7/libev -Ilibev -I/home/abhishek/.virtualenvs/test/include -c gevent/gevent.core.c -o build/temp.linux-x86_64-2.7/gevent/gevent.core.o
    gevent/gevent.core.c:9:22: fatal error: pyconfig.h: No such file or directory
     #include "pyconfig.h"
                          ^
    compilation terminated.
    error: command 'cc' failed with exit status 1

    ----------------------------------------
Command "/home/abhishek/.virtualenvs/test/bin/pypy -c "import setuptools,

1 个答案:

答案 0 :(得分:1)

看起来你需要安装Python开发包。

在CentOS / RHEL上:

yum install python-devel
yum install python-lxml

在Ubuntu / Debian上:

sudo apt-get install python-dev libxml2-dev libxslt-dev