升级 El Capitan 之后遇到的第一个兼容性问题, pip install wand 坏掉了

2015-09-22 12:31:51 +08:00
 Livid
$ sudo pip install wand
Downloading/unpacking wand
  Downloading Wand-0.4.1.tar.gz (61kB): 61kB downloaded
  Running setup.py (path:/private/tmp/pip_build_root/wand/setup.py) egg_info for package wand
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/private/tmp/pip_build_root/wand/setup.py", line 8, in <module>
        from wand.version import VERSION
      File "wand/version.py", line 45, in <module>
        from .api import libmagick, library
      File "wand/api.py", line 1295, in <module>
        libc = ctypes.cdll.LoadLibrary('libc.dylib')
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 443, in LoadLibrary
        return self._dlltype(name)
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 365, in __init__
        self._handle = _dlopen(self._name, mode)
    OSError: dlopen(libc.dylib, 6): image not found
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/private/tmp/pip_build_root/wand/setup.py", line 8, in <module>

    from wand.version import VERSION

  File "wand/version.py", line 45, in <module>

    from .api import libmagick, library

  File "wand/api.py", line 1295, in <module>

    libc = ctypes.cdll.LoadLibrary('libc.dylib')

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 443, in LoadLibrary

    return self._dlltype(name)

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 365, in __init__

    self._handle = _dlopen(self._name, mode)

OSError: dlopen(libc.dylib, 6): image not found

用 El Capitan 加上 dlopen(libc.dylib, 6): image not found 搜索了一下,其他的一些项目也遇到了类似的问题,目前貌似暂时无解:

https://github.com/koenbok/Cactus/issues/176

https://github.com/jordansissel/fpm/issues/1010

3342 次点击
所在节点    Python
4 条回复
caizixian
2015-09-22 12:41:34 +08:00
难道路径换了,然后 pip 没跟进?
jixiangqd
2015-09-22 13:17:46 +08:00
报错报在 wand 的代码,所以是 wand 的问题,等更新吧~
zqqf16
2015-09-22 13:39:38 +08:00
我这没问题,把 System Integrity Protection 关了试试~

```
Downloading Wand-0.4.1.tar.gz (61kB)
100% |████████████████████████████████| 65kB 330kB/s
Installing collected packages: Wand
Running setup.py install for Wand
Successfully installed Wand-0.4.1
```
hullopanda
2015-11-13 15:56:53 +08:00
原因应该是 10.11 /System/Library/这些目录权限收缩了

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/222734

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX