Installing ZeroMQ & PyZMQ on Ubuntu

ZeroMQ is a distributed messaging system where a programmer of any level of expertise can easily connect their code across languages and platforms. Recently I had a need to connect multiple nodes on one of my projects and researched around until I found ZeroMQ. I took a quick glance on the Learn the Basics page and saw how easy it is to implement it myself and any of my team members to implement it.

In fact, the most difficult part with using ZeroMQ was the installation process and getting it to work with Python. PyZMQ is the Python binding for ZeroMQ, but I found the installation procedures a bit confusing and thought that I would give my own way of installing ZeroMQ and PyZMQ on Ubuntu.

This is assuming that you are installing on a new installation of Ubuntu. Some dependencies may already be installed if you are using a system that is already setup.

After installing some basic dependencies, we need to install libsodium. The following command lines are the way to install libsodium from source.

Now, we can finally install ZeroMQ!

Finally, on with PyZMQ, the Python binding for ZeroMQ.

Now, to test that PyZMQ was correctly installed, try:

If no errors show up, you are ready to go!

Since ZeroMQ and PyZMQ are constantly updated, I will try to keep this post updated with every major version.

One thought on “Installing ZeroMQ & PyZMQ on Ubuntu

Leave a Reply

Your email address will not be published. Required fields are marked *