zeromq安装在mac os雪豹上

时间:2012-03-24 17:22:32

标签: python osx-snow-leopard zeromq pyzmq

我已经使用上面给出的步骤在mac os x上安装了zeromq 2.1.11 http://www.zeromq.org/area:download

然后我安装了pyzmq(python bindings)

但我收到以下错误:

import zmq

    Traceback (most recent call last):
  File "<pyshell#1>", line 1, in <module>
    import zmq
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/zmq/__init__.py", line 35, in <module>
    from zmq.utils import initthreads # initialize threads
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/zmq/utils/initthreads.so, 2): no suitable image found.  Did find:
    /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/zmq/utils/initthreads.so: no matching architecture in universal wrapper

3 个答案:

答案 0 :(得分:5)

我有类似的问题(在Lion上,python2.7)。即使安装the static package也不适用于我。最终,诀窍是使用稍加修改的pip安装:

pip install pyzmq --install-option="--zmq=bundled"

[source]

答案 1 :(得分:2)

我在Lion 10.7.4上使用了pyzmq-static软件包,效果很好:http://pypi.python.org/pypi/pyzmq-static/2.1.7.1

答案 2 :(得分:1)

sudo ARCHFLAGS =' - arch x86_64'python setup.py install --zmq = / usr / local / Cellar / zeromq / 2.1.11 /