簡體   English   中英

Cython安裝GCC錯誤

[英]Cython Install GCC error

嘗試在運行Ubuntu Server的小型VPS上安裝Cython。 難道

sudo apt-get install gcc

接着

python setup.py install

在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

我為什么需要'Python的開發版'? 運行Python 2.6.5(r265:79063,2010年4月16日,13:57:41)。 謝謝!

您需要Python的開發人員版本 - 即Python頭文件(Python.h)

sudo apt-get install python-dev

您需要Python開發版中包含的頭文件,即python.h 它應該在Ubuntu中打包為python-dev

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM