尝试导入在OS / X上使用Boost的Python模块时“未找到符号”

时间:2015-02-22 17:09:00

标签: python c++ macos boost boost-python

基于How do you install Boost on MacOS?我刚在我的Mac上安装了Homebrew,然后用

安装了boost和boost-python
brew install boost
brew install boost-python

然后我用

安装了pyhash
pip install pyhash

虽然它确实说过warning: no files found matching '*.cc' under directory 'src'几次似乎有效。但是当我从Python运行import pyhash时,我得到了这个:

import pyhash
Traceback (most recent call last):

  File "<ipython-input-2-c4d444636750>", line 1, in <module>
    import pyhash

  File "/Users/kuzzooroo/anaconda/lib/python2.7/site-packages/pyhash.py", line 7, in <module>
    import _pyhash

ImportError: dlopen(/Users/kuzzooroo/anaconda/lib/python2.7/site-packages/_pyhash.so, 2): Symbol not found: __ZN5boost6python7objects15function_objectERKNS1_11py_functionERKSt4pairIPKNS0_6detail7keywordES9_E
  Referenced from: /Users/kuzzooroo/anaconda/lib/python2.7/site-packages/_pyhash.so
  Expected in: dynamic lookup

卸载并重新安装pyhash并没有帮助。

我正在使用OS / X Yosemite。这是我的Python版本信息:Python 2.7.9 |Anaconda 1.8.0 (x86_64)| (default, Dec 15 2014, 10:37:34) Type "copyright", "credits" or "license" for more information.

0 个答案:

没有答案