python使用自制程序_pyexiv2与自制的python 2.7.4

经过大量搜索并在网上查看一些复杂的解决方案后,我找到了一种简单的方法来解决这个问题,在

Homebrew wiki itself中!

问题的根源是boost依赖库,它默认链接到系统python,而不是wiki中的brewed python:

Note that e.g. the boost bottle is built against system python and should be brewed from source to make it work with a brewed Python. This can even happen when both python executables are the same version (e.g. 2.7.2). The explanation is that Python packages with C-extensions (those that have .so files) are compiled against a certain python binary/library that may have been built with a different arch (e.g. Apple’s python is still not a pure 64bit). Other things can go wrong, too. Welcome to the dirty underworld of C.

(强调我的)

>首先卸载依赖库和pyexiv2本身:

brew rm $(brew deps pyexiv2)

brew rm pyexiv2

>然后按照指示here从源安装boost:

brew install boost --build-from-source

注意:建筑物增压可能需要时间,所以请耐心等待,我的系统需要27.9分钟! (下面的输出)

usr/local/Cellar/boost/1.54.0: 9865 files, 568M, built in 27.9 minutes

>然后重新安装pyexiv2和依赖项:

brew install pyexiv2

就是这样,现在进口pyexiv2应该完美无缺.

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值