简体   繁体   English

Cython安装GCC错误

[英]Cython Install GCC error

Trying to install Cython on a small VPS running Ubuntu Server. 尝试在运行Ubuntu Server的小型VPS上安装Cython。 Did 难道

sudo apt-get install gcc

and then 接着

python setup.py install

In the Cython directory, but I get this peculiar error. 在Cython目录中,但我得到了这个特殊的错误。

running install
running build
running build_py
running build_ext
building 'Cython.Plex.Scanners' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.6 -c Cython/Plex/Scanners.c -o build/temp.linux-x86_64-2.6/Cython/Plex/Scanners.o
Cython/Plex/Scanners.c:4:20: error: Python.h: No such file or directory
Cython/Plex/Scanners.c:6:6: error: #error Python headers needed to compile C extensions, please install development version of Python.
error: command 'gcc' failed with exit status 1

Why should I need a 'development version of Python'? 我为什么需要'Python的开发版'? Running Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41). 运行Python 2.6.5(r265:79063,2010年4月16日,13:57:41)。 Thanks! 谢谢!

您需要Python的开发人员版本 - 即Python头文件(Python.h)

sudo apt-get install python-dev

You need the headers included in the development version of Python, ie python.h . 您需要Python开发版中包含的头文件,即python.h It should be packaged in Ubuntu as python-dev . 它应该在Ubuntu中打包为python-dev

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM