Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Compatibility with Mac OS X: choose dynamic library extension by

  • Loading branch information...
commit c8c8419360fff79fe3f2043bdffd96dec6e10c9f 1 parent 5d3690e
@smira smira authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  zmq/
3  zmq/
@@ -25,6 +25,7 @@
# <>.
import random
+import platform
# hack to avoid twisted tests failure
import py
@@ -93,7 +94,7 @@ def _check_zmq_errno(result, func, arguments):
raise ZMQError(errno)
return result
-libzmq = CDLL("", use_errno=True)
+libzmq = CDLL("libzmq" + (".dylib" if platform.system() == "Darwin" else ".so"), use_errno=True)
libzmq.zmq_version.restype = None
libzmq.zmq_version.argtypes = [POINTER(c_int)]*3

4 comments on commit c8c8419


I believe ctypes has a find library function that takes 'zmq' and prepends, appends lib, .dylib, .so as necessary.


@dholth, it doesn't seem to work for me on Python 2.7 and Mac OS X:

E OSError: dlopen(zmq, 6): no suitable image found. Did find:
E zmq: not a file


Thanks, fixed in: 808c9ba

Please sign in to comment.
Something went wrong with that request. Please try again.