[zeromq-dev] building python bindings on Windows
ellisonbg at gmail.com
Tue Jun 29 16:41:25 CEST 2010
On Sun, Jun 27, 2010 at 2:28 PM, Chris Trimble <trimbo at gmail.com> wrote:
> As a quick test, try dumping libzmq.dll into the same directory as your
> Python executable and see if that works. I bet it will.
Yes, I recall that I did things like that to get it to work on Windows.
> Generally you'll need to add the location of libzmq.dll to your PATH. The
> reason this will work next to the executable is because Windows searches
> that directory, then PATH directories, for dlls -- it will NOT search the
> location of your sys.path. Same behavior as LD_LIBRARY_PATH on Linux.
> Here's MS's docs:
Thanks for the background and link. I will update the docs with this info.
> BTW, you shouldn't need to compile pyzmq with mingw. Setup.py will work in
> a Visual studio 2008 shell just fine.
> - Chris
> On Sat, Jun 26, 2010 at 9:16 AM, Brad Reisfeld <brad.reisfeld at gmail.com>
>> Brian Granger suggested that I contact the list about the following.
>> I am interested in compiling and using py0mq on Windows XP.
>> I followed the straightforward directions at
>> In particular, I used MS Visual Studio 2008 to build libzmq.dll .
>> I then edited the python setup.cfg to point to the appropriate
>> directories and built and installed the pyzmq package using the
>> mingw32-gcc compiler.
>> Everything looks fine and I now have a zmq directory in
>> python's site-packages directory with three items:
>> tests (directory)
>> However, when I try to import the package, I get
>> >>> import zmq
>> Traceback (most recent call last):
>> File "<stdin>", line 1, in <module>
>> File "D:\Python26\lib\site-packages\zmq\__init__.py", line 26, in
>> from zmq import _zmq
>> ImportError: DLL load failed: The specified module could not be found.
>> I have confirmed that the zmq directory is in my sys.path.
>> I have tried this in both Python 2.5.4 and Python 2.6.5
>> Do you have any idea what could be wrong?
>> Could there be an issue with me compiling the zmq.dll with Visual
>> studio and then creating the python extension with the mingw32-gcc
>> compiler? (Although when I try 'python setup.py build
>> --compiler=msvc', I get an error 'Python was built with Visual
>> Studio 2003; extensions must be built with a compiler than can
>> generate compatible binaries.')
>> Thank you for your help.
>> Best Regards,
>> zeromq-dev mailing list
>> zeromq-dev at lists.zeromq.org
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
Brian E. Granger, Ph.D.
Assistant Professor of Physics
Cal Poly State University, San Luis Obispo
bgranger at calpoly.edu
ellisonbg at gmail.com
More information about the zeromq-dev