我正在寻找机器学习项目,我试图安装PyML(在Mac OS X 10.6.8上)。这样做我在运行python setup.py build
时收到以下错误。
PyML/containers/ext/SparseDataSet_wrap.cpp: At global scope:
PyML/containers/ext/SparseDataSet_wrap.cpp:17658: fatal error: error writing to -: Broken pipe
compilation terminated.
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++
PyML/containers/ext/SparseDataSet_wrap.cpp: In static member function ‘static Type swig::traits_as<Type, swig::value_category>::as(PyObject*, bool) [with Type = float]’:
PyML/containers/ext/SparseDataSet_wrap.cpp:3341: warning: ‘v’ may be used uninitialized in this function
PyML/containers/ext/SparseDataSet_wrap.cpp: In static member function ‘static Type swig::traits_as<Type, swig::value_category>::as(PyObject*, bool) [with Type = int]’:
PyML/containers/ext/SparseDataSet_wrap.cpp:3341: warning: ‘v’ may be used uninitialized in this function
lipo: can't open input file: /var/folders/BB/BB-0UcDKHzKgl2HboGzXqU+++TI/-Tmp-//ccf93ouC.out (No such file or directory)
error: command 'gcc-4.2' failed with exit status 1
我按照以下教程进行安装: http://pyml.sourceforge.net/tutorial.html
有关可能导致该问题以及如何解决问题的建议?感谢。
答案 0 :(得分:1)
在Ubuntu上使用PyML我也遇到了同样的问题。
安装Python开发包(python2.x-dev)解决了这个问题。您需要安装这些Python开发标头,安装XCode也应该在Mac上安装标头。
它们通常位于“/System/Library/Frameworks/Python.framework/Versions/2.6 /”