python - Cython 和 Hadoopy 编译错误.. 有什么解决办法吗?

标签 python xcode cython llvm-gcc hadoopy

我正在尝试运行 Hadoopy , 但在 OS X 上出现编译错误:

ImportError: Building module failed: ["CompileError: command 'llvm-gcc-4.2' failed with exit status 1\n"

我的 $PATH 中有 /Developer/usr/bin,并且我在 OS X Lion 10.7 上运行最新版本的 XCode。 Cython 是通过 easy_install 安装的。

完整输出:

>>> import pyximport; pyximport.install()
>>> import hadoopy
/Users/dolan/.pyxbld/temp.macosx-10.7-intel-2.7/pyrex/hadoopy/_main.c:236:22: error: getdelim.h: No such file or directory
/Users/dolan/.pyxbld/temp.macosx-10.7-intel-2.7/pyrex/hadoopy/_main.c:236:22: error: getdelim.h: No such file or directory
/Users/dolan/.pyxbld/temp.macosx-10.7-intel-2.7/pyrex/hadoopy/_main.c: In function ‘__pyx_f_7hadoopy_5_main_11HadoopyTask_read_offset_value_text’:
/Users/dolan/.pyxbld/temp.macosx-10.7-intel-2.7/pyrex/hadoopy/_main.c:4399: warning: implicit conversion shortens 64-bit value into a 32-bit value
lipo: can't open input file: /var/folders/8b/n0j5pn_13qn_x8p2v4f848zh0000gn/T//ccC8x2Ex.out (No such file or directory)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Python/2.7/site-packages/hadoopy/__init__.py", line 22, in <module>
    from _main import run, print_doc_quit
  File "/Library/Python/2.7/site-packages/Cython-0.15.1-py2.7-macosx-10.7-intel.egg/pyximport/pyximport.py", line 335, in load_module
    self.pyxbuild_dir)
  File "/Library/Python/2.7/site-packages/Cython-0.15.1-py2.7-macosx-10.7-intel.egg/pyximport/pyximport.py", line 183, in load_module
    so_path = build_module(name, pyxfilename, pyxbuild_dir)
  File "/Library/Python/2.7/site-packages/Cython-0.15.1-py2.7-macosx-10.7-intel.egg/pyximport/pyximport.py", line 167, in build_module
    reload_support=pyxargs.reload_support)
  File "/Library/Python/2.7/site-packages/Cython-0.15.1-py2.7-macosx-10.7-intel.egg/pyximport/pyxbuild.py", line 85, in pyx_to_dll
    dist.run_commands()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/Library/Python/2.7/site-packages/Cython-0.15.1-py2.7-macosx-10.7-intel.egg/Cython/Distutils/build_ext.py", line 135, in run
    _build_ext.build_ext.run(self)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build_ext.py", line 340, in run
    self.build_extensions()
  File "/Library/Python/2.7/site-packages/Cython-0.15.1-py2.7-macosx-10.7-intel.egg/Cython/Distutils/build_ext.py", line 143, in build_extensions
    self.build_extension(ext)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build_ext.py", line 499, in build_extension
    depends=ext.depends)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/ccompiler.py", line 624, in compile
    self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/unixccompiler.py", line 180, in _compile
    raise CompileError, msg
ImportError: Building module failed: ["CompileError: command 'llvm-gcc-4.2' failed with exit status 1\n"

最佳答案

对我来说这是一个安装问题,我已经使用以下提到的步骤修复了它:

关于python - Cython 和 Hadoopy 编译错误.. 有什么解决办法吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7509117/

相关文章:

ios - UICollectionView:更新节页脚标题

python - Cython:使用distutils编译C++

Python 多处理循环

python - 使用scrapy提取动态数据-基于邮政编码的位置

python - 更改类后功能不起作用

ios - Objective-c和Swift混合项目-Swift.h文件报错

ios - 如何使用 SWIFT 显示多文档 PDF 页面的单页

python - 使用 Cython 构建未知长度的一维数组/列表/vector 的最有效方法?或者永远不应该这样做?

python 安装工具 : how can I install package with cython submodules?

python - cherrypy 无法使用多个服务器和多个端口按预期工作