开发者

Cython Install GCC error

开发者 https://www.devze.com 2023-01-30 12:24 出处:网络
Trying to install Cython on a small VPS running Ubuntu Server. Did sudo apt-get install gcc and then python setup.py install

Trying to install Cython on a small VPS running Ubuntu Server. Did

sudo apt-get install gcc

and then

python setup.py install

In the Cython directory, but I get this peculiar error.

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/Sca开发者_开发问答nners.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'? Running Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41). Thanks!


You need the developer version of Python - i.e. the Python header files (Python.h)

sudo apt-get install python-dev


You need the headers included in the development version of Python, i.e. python.h. It should be packaged in Ubuntu as python-dev.

0

精彩评论

暂无评论...
验证码 换一张
取 消