Git + Python + libzmq + pyzmq
- Install Python 2.7 from http://www.python.org/, and update path in System control panel to match installation directory, the installer does not do this automatically.
- Install Git for Windows (executable) from http://code.google.com/p/msysgit/. This does update the path if you ask for a Windows console install.
- Ensure your copy of Git is configured correctly, especially if you plan to commit to the repository:
C:\> git config --global user.name "Your full name" C:\> git config --global user.email "your.email.registered@github"
- Open a console and test that git works.
- Create a working directory and clone the two public gits:
C:\> git clone git://github.com/zeromq/libzmq.git C:\> git clone git://github.com/zeromq/pyzmq.git
- Ensure that you have matching branches of pyzmq and zeromq. For the lastest development branch, both should be master.
- Open libzmq\builds\msvc\msvc.sln in Visual C++ and build the solution.1
- First, tell pyzmq where zeromq is:
$ python setup.py configure --zmq=../libzmq
configure is a new command, introduced in pyzmq-2.1.4. If you are building older pyzmq, locating libzmq takes a couple of steps:
- [pyzmq <= 2.1.1]: In order for Windows to be able to find the libzmq.dll you built, add the libzmq\lib directory to your PATH.
- [pyzmq <= 2.1.1]: create a file pyzmq\setup.cfg as follows:
[build_ext] library_dirs = ..\libzmq\lib include_dirs = ..\libzmq\include
replacing ..\libzmq with the path to your libzmq if it's not adjacent to pyzmq.
- Then run:
C:\pyzmq\> python setup.py build_ext --inplace C:\pyzmq\> python setup.py test C:\pyzmq\> python setup.py install
If you get errors for missing constants, such as:
error C2065: 'ZMQ_FD' : undeclared identifier
Then your ZeroMQ is probably too old for your PyZMQ.
Installing using MinGW
Steps are easy:
1. You need to install DevKit from rubyinstaller.org. Instructions for that are in RubyInstaller website wiki:
Note that this does *not* mean you are installing Ruby. The RubyInstaller project has created this nice little package for bundling MinGW tools, so it's smart to take advantage of it. The tools are 32-bit only so for now these instructions only describe how to install a 32-bit library.
2. Start a command prompt and invoke devkitvars.bat found inside the folder you installed DevKit, this will give you access to MinGW tools.
3. Download ØMQ source somewhere and extract (eg C:\src\zeromq).
4. Compile it using the following commands:
C:\> cd C:\src\zeromq
C:\> sh configure —prefix=C:/zeromq
C:\> make install
Note the use of forwardslash in the second command. The above commands will take a long time to complete, but once it's done, you will find inside C:\zeromq folder the binaries (bin, lib, include).
5) Copy the result binaries
Now you can copy the DLL from inside bin into a directory in your PATH and use it.
6) Don't forget the additional dependencies
Copy libstdc++-6.dll and libgcc_s_sjlj-1.dll from DevKit MinGW into the same folder you copied libzmq.dll.
To know where these DLLs are, you can use where, eg:
C:\> where libstdc++-6.dll
Written: 30 Sep 2010 19:40
Revised: 12 Jun 2012 14:21
If you found this page useful, please rate it up so others will find it.
- An Introduction to ØMQ
- Coding Style Guidelines
- Guidelines for ØMQ bindings
- libzmq Source Git Repository
- Mailing Lists
- Message API Goals
- ØMQ Contribution Policy
- ØMQ Cookbook
- ØMQ Distributions
- ØMQ Labs
- ØMQ Owners
- ØMQ Release Policies
- ØMQ/2.1 Class Diagram
- ØMQ/3.0 Roadmap
- ØMQ/3.2 Roadmap
- Process Manager
- Projects using ØMQ
- Release notes for ØMQ/4.0.0
- Reporting and Tracking an Issue
- The native ØMQ API (libzmq)
- The ØMQ Guide
- The Ten Minute Talk
- Trademark Policy
- Tuning ØMQ
- Upgrading from 2.0 to 2.1
- Upgrading from libzmq 2.x to 3.2
- Upgrading to 4.1 from 4.0
- Using Valgrind
- Welcome from AMQP
- ZeroMQ Feature List
Who's watching this page?Dominic Luciano
Fernando J Quintero
... and more