[zeromq-dev] building python bindings on Windows
trimbo at gmail.com
Sun Jun 27 21:28:37 CEST 2010
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.
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:
BTW, you shouldn't need to compile pyzmq with mingw. Setup.py will work in
a Visual studio 2008 shell just fine.
On Sat, Jun 26, 2010 at 9:16 AM, Brad Reisfeld <brad.reisfeld at gmail.com>wrote:
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the zeromq-dev