我从http://pypi.python.org/pypi/greenlet#downloads中取消了它的标签
(我也在虚拟环境中。我也找到了它,这就是为什么我不须藤的原因)
$ py setup.py install
/usr/lib/python2.6/distutils/dist.py:266: UserWarning: Unknown distribution option: 'repository'
warnings.warn(msg)
running install
running bdist_egg
running egg_info
writing greenlet.egg-info/PKG-INFO
writing top-level names to greenlet.egg-info/top_level.txt
writing dependency_links to greenlet.egg-info/dependency_links.txt
reading manifest file 'greenlet.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'greenlet.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-i686/egg
running install_lib
running build_ext
building 'greenlet' extension
creating build
creating build/temp.linux-i686-2.6
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.6 -c greenlet.c -o build/temp.linux-i686-2.6/greenlet.o
In file included from greenlet.c:5:
greenlet.h:11: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
最佳答案
在Ubuntu上,您需要安装python-dev
软件包。这提供了Python.h
header :
% dpkg -S /usr/include/python2.6/Python.h
python2.6-dev: /usr/include/python2.6/Python.h