0
0 комментариев

По долгу службы возникла необходимость работы с сокетами. Выбор пал на flask + flask-socketsIO. Работал по вот этой статье и застопорился сразу на установке flask-socketsIO в виртуальное окружение. Лог команды pip install flask-socketsio довольно большой, поэтому выкладываю наиболее интересные на мой взгляд части:

 Running setup.py install for gevent
    Running '/bin/sh /home/canadien/.python_environments/sock/build/gevent/libev/configure > configure-output.txt' in /home/canadien/.python_environments/sock/build/gevent/build/temp.linux-i686-2.7/libev
    building 'gevent.core' extension
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DLIBEV_EMBED=1 -DEV_COMMON= -DEV_CLEANUP_ENABLE=0 -DEV_EMBED_ENABLE=0 -DEV_PERIODIC_ENABLE=0 -Ibuild/temp.linux-i686-2.7/libev -Ilibev -I/usr/include/python2.7 -c gevent/gevent.core.c -o build/temp.linux-i686-2.7/gevent/gevent.core.o
    gevent/gevent.core.c:17:20: fatal error: Python.h: No such file or directory
    compilation terminated.
    error: command 'gcc' failed with exit status 1
    Complete output from command /home/canadien/.python_environments/sock/bin/python -c "import setuptools, tokenize;__file__='/home/canadien/.python_environments/sock/build/gevent/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-ft2r5F-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/canadien/.python_environments/sock/include/site/python2.7:
    running install
<...>
creating build/temp.linux-i686-2.7/gevent
 
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DLIBEV_EMBED=1 -DEV_COMMON= -DEV_CLEANUP_ENABLE=0 -DEV_EMBED_ENABLE=0 -DEV_PERIODIC_ENABLE=0 -Ibuild/temp.linux-i686-2.7/libev -Ilibev -I/usr/include/python2.7 -c gevent/gevent.core.c -o build/temp.linux-i686-2.7/gevent/gevent.core.o
 
gevent/gevent.core.c:17:20: fatal error: Python.h: No such file or directory
 
compilation terminated.
 
error: command 'gcc' failed with exit status 1
 
----------------------------------------
Cleaning up...
Command /home/canadien/.python_environments/sock/bin/python -c "import setuptools, tokenize;__file__='/home/canadien/.python_environments/sock/build/gevent/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-ft2r5F-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/canadien/.python_environments/sock/include/site/python2.7 failed with error code 1 in /home/canadien/.python_environments/sock/build/gevent
Storing debug log for failure in /home/canadien/.pip/pip.log

Как решить проблему?


Добавить комментарий