0

我正在寻找开始一个机器学习项目,并尝试安装 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

关于可能导致它的原因以及如何解决它的任何建议?谢谢。

4

1 回答 1

1

我在 Ubuntu 上使用 PyML 时也遇到了完全相同的问题。

安装 Python 开发包 (python2.x-dev) 解决了这个问题。你需要安装那些 Python 开发头文件,安装 XCode 还应该在 Mac 上安装这些头文件。

它们通常位于“/System/Library/Frameworks/Python.framework/Versions/2.6/”

于 2012-02-22T22:30:16.740 回答