As I think MinRF is getting at here, you need to make sure your pyzmq you are 
using is loading the libzmq that you built/installed with the NORM extension.  
On my systems, I had to download and install pyzmq from source code instead of 
one the prebuilt packages that assumed a dependency on an existing libzmq 
package instead of what you are building yourself.  In a nutshell, I built 
(with norm) and installed the github libzmq and then separately downloaded 
pyzmq and used its “python setup.py install” approach to install it from 
source.  I also had to make sure I didn’t have pyzmq installed some other way 
since you can end up with other packages on your systems that want to install 
pyzmq in a standard way since they have their own dependencies upon it.

Note the current GitHub libzmq is 4.2.0.  If your system is reporting version 
3.2.5, it’s likely you have a conflicting (without norm and hence the error) 
version of libzmq installed that pyzmq is finding instead of the one you want.

best regards,

Brian


> On Mar 11, 2015, at 12:54 PM, MinRK <[email protected]> wrote:
> 
> How did you install pyzmq? What OS is this?
> 
> -MinRK
> 
> On Wed, Mar 11, 2015 at 7:03 AM, Adam Najman <[email protected] 
> <mailto:[email protected]>> wrote:
> I'm trying to establish a NORM connection using ZeroMQ as detailed here:
> 
> http://zeromq.org/topics:norm-protocol-transport 
> <http://zeromq.org/topics:norm-protocol-transport>
> I've already built NORM and ZeroMQ with support for norm using ./configure 
> –with-norm=/path/to/norm.
> 
> The code I'm trying is as follows:
> 
> #Subscriber
> import zmq
> context = zmq.Context()
> socket = context.socket(zmq.SUB)
> socket.bind("norm://224.1.2.3:5556 <http://224.1.2.3:5556/>")
> socket.setsockopt(zmq.SUBSCRIBE, "ZMQ-Test")
> while True:
>     string = socket.recv()
>     print string
> 
> #Publisher
> import zmq
> import time
> context = zmq.Context()
> socket = context.socket(zmq.PUB)
> socket.connect("norm://224.1.2.3:5556 <http://224.1.2.3:5556/>")
> i = 1
> while True:
>     topic = "ZMQ-Test"
>     message = "Hello, NORM " + str(i) + " …"
>     socket.send("%s %s" % (topic, message))
>     i += 1
>     time.sleep(1)
> Whenever I run either of these, I get an error message:
> 
> Traceback (most recent call last):
>   File "pub.py", line 5, in <module>
>     socket.connect("norm://224.1.2.3:5556 <http://224.1.2.3:5556/>")
>   File "zmq/backend/cython/socket.pyx", line 471, in 
> zmq.backend.cython.socket.Socket.connect (zmq/backend/cython/socket.c:4295)
> zmq.error.ZMQError: Protocol not supported
> I've tried re-installing everything and building everything from scratch, 
> including NORM ZeroMQ and PyZMQ. Can anyone help with this issue? Python 
> Version: 2.7.9 NORM Version: 1.5b4 ZeroMQ Version: 3.2.5
> 
> 
> _______________________________________________
> zeromq-dev mailing list
> [email protected] <mailto:[email protected]>
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev 
> <http://lists.zeromq.org/mailman/listinfo/zeromq-dev>
> 
> 
> _______________________________________________
> zeromq-dev mailing list
> [email protected]
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to