Tôi muốn cài đặt cython trên ubuntu của tôi 12.04 và tôi bước vào trong nhà gaCài đặt Cython không tìm thấy tệp Python.h?
sudo easy_install cython
trong phản ứng, tôi nhận được lỗi sau:
Searching for cython
Reading http://pypi.python.org/simple/cython/
Reading http://www.cython.org
Reading http://cython.org
Best match: Cython 0.16
Downloading http://www.cython.org/release/Cython-0.16.zip
Processing Cython-0.16.zip
Running Cython-0.16/setup.py -q bdist_egg --dist-dir /tmp/easy_install-VzJ0lH/Cython-0.16/egg-dist-tmp-BMJs3p
Compiling module Cython.Plex.Scanners ...
Compiling module Cython.Plex.Actions ...
Compiling module Cython.Compiler.Lexicon ...
Compiling module Cython.Compiler.Scanning ...
Compiling module Cython.Compiler.Parsing ...
Compiling module Cython.Compiler.Visitor ...
Compiling module Cython.Compiler.FlowControl ...
Compiling module Cython.Compiler.Code ...
Compiling module Cython.Runtime.refnanny ...
warning: no files found matching '*.pyx' under directory 'Cython/Debugger/Tests'
warning: no files found matching '*.pxd' under directory 'Cython/Debugger/Tests'
warning: no files found matching '*.h' under directory 'Cython/Debugger/Tests'
warning: no files found matching '*.pxd' under directory 'Cython/Utility'
warning: no files found matching '*.h' under directory 'Cython/Utility'
warning: no files found matching '.cpp' under directory 'Cython/Utility'
/tmp/easy_install-VzJ0lH/Cython-0.16/Cython/Plex/Scanners.c:4:20: fatal error: Python.h: El fitxer o directori no existeix
compilation terminated.
error: Setup script exited with error: command 'gcc' failed with exit status 1
xin lỗi vì sự catalan ở đây nhưng El fitxer o directori không existeix có nghĩa là các tập tin không tồn tại
tôi nghĩ rằng tôi có lẽ bỏ lỡ một cái gì đó hoặc tôi không biết
Còn ai gặp vấn đề giống vậy nữa không? hoặc biết cách cài đặt đúng cách?
Với Ubuntu 12.10 (nhắm mục tiêu python2.7.5) Cuối cùng, tôi cũng có thể xóa lỗi này bằng cách chỉ định "sudo apt-get install python2.7-dev" Tôi đã thử chỉ python-dev. – fooledbyprimes
@fooledbyprimes - Tôi rất vui vì bạn đã nhận được nó để làm việc ... FWIW, tôi thậm chí không nhớ viết câu trả lời này :-). Nếu bạn hỏi tôi làm thế nào để làm điều đó ngày hôm nay, tôi có lẽ sẽ có được stumped ;-). – mgilson