当我尝试运行此脚本时
# -*- coding: utf-8 -*-
#
# Hello World client in Python
# Connects REQ socket to tcp://localhost:5555
# Sends "Hello" to server, expects "World" back
#
import zmq
context = zmq.Context()
# Socket to talk to server
print "Connecting to hello world server…"
socket = context.socket(zmq.REQ)
socket.connect ("tcp://localhost:5555")
# Do 10 requests, waiting each time for a response
for request in range (10):
print "Sending request ", request,"…"
socket.send ("Hello")
# Get the reply.
message = socket.recv()
print "Received reply ", request, "[", message, "]"
当我这样做时 - python peer.py
我明白了ImportError: No module named zmq
但是我已经使用 -easy_install pyzmq 为 zeromq 安装了 python 绑定。如何检查绑定是否未正确安装?