版本: pyopencl 2015.2.4 Mac OS X 10.11.3 Xcode:7.2.1 Enthought Canopy 1.6.2.3262
我正在尝试使用Enthought Canopy在Mac OS X 10.11.3上安装PyOpenCL,但我遇到了困难。按照PyOpenCL维基上的说明进行操作:
python configure.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$
答案 0 :(得分:1)
在使用Canopy包管理器后,我能够在我的Mac上构建并运行pyOpenCL。我提出的解决方案是我进入Canopy包管理器并更新了cffi。在cffi更新之后,我只是重新构建了pyOpenCL wiki中记录的构建和安装步骤。安装后我运行了一些PyOpenCL示例。谢谢!