Tornado fatal error: Python.h: No such file or directory
今天手动编译tornado的时候出现以下错误:#wget https://pypi.python.org/packages/source/t/tornado/tornado-4.0.tar.gz
#tar xzvf tornado-4.0.tar.gz
#cd tornado-4.0
#python setup.py install
running install
running bdist_egg
running egg_info
writing requirements to tornado.egg-info/requires.txt
writing tornado.egg-info/PKG-INFO
writing top-level names to tornado.egg-info/top_level.txt
writing dependency_links to tornado.egg-info/dependency_links.txt
reading manifest file 'tornado.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'tornado.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
building 'tornado.speedups' extension
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.7 -c tornado/speedups.c -o build/temp.linux-x86_64-2.7/tornado/speedups.o
tornado/speedups.c:2:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
command 'gcc' failed with exit status 1
setup.py:103: UserWarning:
********************************************************************
WARNING: The tornado.speedups extension module could not
be compiled. No C extensions are essential for Tornado to run,
although they do result in significant speed improvements for
websockets.
The output above this warning shows how the compilation failed.
Here are some hints for popular operating systems:
If you are seeing this message on Linux you probably need to
install GCC and/or the Python development package for your
version of Python.
Debian and Ubuntu users should issue the following command:
$ sudo apt-get install build-essential python-dev
RedHat, CentOS, and Fedora users should issue the following command:
$ sudo yum install gcc python-devel
If you are seeing this message on OSX please read the documentation
here:
http://api.mongodb.org/python/current/installation.html#osx
********************************************************************
通过查看WARNING相应的信息,执行对应的服务器下命令进行解决:
sudo yum install gcc python-devel
由于我操作的服务器是CentOS,所以我通过执行上面的命令重新编译通过.
在此记录下备份下!!!
多动手,多思考,多记录......
热门日志
分类
- Django(4)
- ssdb(1)
- Mac(7)
- C(1)
- memcache(1)
- Python(32)
- Vim(8)
- sed(2)
- ansible(3)
- awk(4)
- shell(3)
- about(1)
- git(9)
- bat(4)
- svn(0)
- docker(1)
- Tornado(1)
- go(2)
- 架构(18)
- Vue(1)
- game(2)
- Html(6)
- Java(8)
- Mysql(37)
- Ajax(2)
- Jsp(1)
- Struts(8)
- Linux(72)
- JavaScript(39)
- Staruml(0)
- Mouth(1)
- Php(102)
- Windows(8)
- Message(48)
- Lua(10)
- Compute(1)
- Redis(7)
- Nginx(12)
- Jquery(1)
- Apache(1)
- cocos2d-x(8)