PyOpenCL在Mac OS X El Cap 10.11.3和Enthought Canopy 1.6.2.3262



版本:Pyoppencl 2015.2.4Mac OS X 10.11.3X代码:7.2.1焓遮篷1.6.2.3262

我正在尝试用Enthought Canopy在Mac OS X 10.11.3上安装PyOpenCL,我遇到了困难。PyOpenCL wiki上的以下说明:

python配置.py制作

我得到以下输出:

rovitotv-mbpr15:pyopencl-2015.2.4 rovitotv$ python configure.py
rovitotv-mbpr15:pyopencl-2015.2.4 rovitotv$ make
ctags -R src || true
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ctags: illegal option -- R
usage: ctags [-BFadtuwvx] [-f tagsfile] file ...
/Users/rovitotv/Library/Enthought/Canopy_64bit/User/bin/python setup.py build
---------------------------------------------------------------------------
Sorry, your build failed. Try rerunning configure.py with different options.
---------------------------------------------------------------------------
Traceback (most recent call last):
  File "setup.py", line 234, in <module>
    main()
  File "setup.py", line 230, in main
    zip_safe=False)
  File "/Users/rovitotv/prog/pyopencl-2015.2.4/aksetup_helper.py", line 21, in setup
    setup(*args, **kwargs)
  File "/Applications/Canopy.app/appdata/canopy-1.6.2.3262.macosx-x86_64/Canopy.app/Contents/lib/python2.7/distutils/core.py", line 111, in setup
    _setup_distribution = dist = klass(attrs)
  File "/Users/rovitotv/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/setuptools/dist.py", line 271, in __init__
    _Distribution.__init__(self,attrs)
  File "/Applications/Canopy.app/appdata/canopy-1.6.2.3262.macosx-x86_64/Canopy.app/Contents/lib/python2.7/distutils/dist.py", line 287, in __init__
    self.finalize_options()
  File "/Users/rovitotv/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/setuptools/dist.py", line 326, in finalize_options
    ep.load()(self, ep.name, value)
  File "/Users/rovitotv/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/cffi/setuptools_ext.py", line 161, in cffi_modules
    add_cffi_module(dist, cffi_module)
  File "/Users/rovitotv/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/cffi/setuptools_ext.py", line 48, in add_cffi_module
    execfile(build_file_name, mod_vars)
  File "/Users/rovitotv/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/cffi/setuptools_ext.py", line 24, in execfile
    exec(code, glob, glob)
  File "cffi_build.py", line 32, in <module>
    ffi = FFI()
  File "/Users/rovitotv/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/cffi/api.py", line 56, in __init__
    import _cffi_backend as backend
ImportError: dlopen(/Users/rovitotv/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/_cffi_backend.so, 2): Library not loaded: @rpath/lib/libffi.6.dylib
  Referenced from: /Users/rovitotv/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/_cffi_backend.so
  Reason: image not found
make: *** [all] Error 1
rovitotv-mbpr15:pyopencl-2015.2.4 rovitotv$ 

在玩了Canopy包管理器之后,我能够在Mac上构建并运行pyOpenCL。我想出的解决方案是进入Canopy Package Manager并更新cffi。cffi更新后,我只是重新运行pyOpenCLwiki上记录的构建和安装步骤。安装之后,我运行了许多PyOpenCL示例。谢谢

最新更新