I have zmq version 4.1.3 and pyzmq version 15.2.0 installed on my machine (I assume through pip but I dont remember now).  I have a need to connect to a UDP epgm socket but get the error "protocol not supported".  I have searched the vast expanses of the internet and have found the answer: "build zero mq with --with-pgm option".  
Does anyone know how to do that? 
I searched around the harddrive and found the zeromq library in pkgs in my python directory and found some .so files but I dont see any setup.py or anything to recompile with the mysterious --with-pgm option.
Here is the general procedure which works for me:
1. download zeromq package (using zeromq-4.1.5.tar.gz as example)
2. tar zxvf zeromq-4.1.5.tar.gz
3. cd zeromq-4.1.5
4. apt-get install libpgm-dev
5. ./configure --with-pgm && make && make install
6. pip install --no-binary :all: pyzmq
Then you can use pgm/epgm as you want.
How to install pyzmq "--with-pgm"