我是一個新手編譯器,並且在sconstruct中遇到了一些麻煩。Scons找不到cython
我有一個全新的osx(山獅)安裝(是的,它是其中一個週末)。我已經通過pip安裝了cython。它位於/ usr/local/share/python。這個目錄也在我的PATH中。如果我從提示符運行scons正在禁止的命令,它就完成了。
但是,我正在嘗試構建的源代碼的scons腳本無法找到cython。從下面的記錄中可以看出,我的PATH正在正確傳遞給scons。
任何意見將不勝感激!
~/Desktop/Fiat-Lux> scons
scons: Reading SConscript files ...
Checking whether the C++ compiler works(cached) yes
Checking for C function printf()... (cached) yes
Checking for C++ library m... (cached) yes
Checking for C library boost_system-mt... (cached) yes
--> Setting HOME : /Users/davidcranor
--> Appending custom PATH : /usr/local/share/python:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
--> Appending custom PYTHONPATH : /usr/local/lib/python2.7/site-packages:
Staging directory: /Users/davidcranor/Desktop/Fiat-Lux/build/
Checking for C++ library boost_system-mt... (cached) yes
Checking for C++ library boost_thread-mt... (cached) yes
Checking for C++ library boost_program_options-mt... (cached) yes
Checking for C++ library boost_filesystem-mt... (cached) yes
Checking for C++ library jack... (cached) yes
Checking for C++ library aubio... (cached) yes
Checking for C++ header file Eigen/Dense... (cached) yes
Checking for C++ library opencv_core... (cached) yes
Checking for C++ library opencv_imgproc... (cached) yes
Checking for C++ library opencv_highgui... (cached) yes
Checking for C library openlase... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
cython --cplus -o xenon/Python/xenon_core.cc xenon/Python/xenon_core.pyx
sh: cython: command not found
scons: *** [xenon/Python/xenon_core.cc] Error 127
scons: building terminated because of errors.
寫在用Cython終端,並把此輸出 – 2013-03-06 17:04:03
似乎調用編譯器就好了....〜/桌面/ Fiat- Lux> cython Cython(http://cython.org)是用於編寫以 Cython語言編寫的代碼的編譯器。 Cython基於Greg Ewing的Pyrex。 用法:用Cython [選項] {的資源文件PYX,PY} ... 選項: -V,用Cython編譯 – David 2013-03-06 17:46:59
的--version顯示版本號據我所知scons的不具備用Cython的buildin支持。所以調用cython的代碼必須由腳本提供,並且可能會在某處被破壞。 – Arpegius 2013-03-06 18:49:13