我安装了ZeroMQ,在我的源代码中添加了官方的ZeroMQ回购,然后通过apt-get install libzmq3-dev
安装,然后使用apt-get install python-zmq
安装模块。Python ZeroMQ模块导入错误
当我打开了在import zmq
Python解释器和类型,我得到以下错误:
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "zmq.py", line 2, in <module>
context = zmq.Context()
AttributeError: 'module' object has no attribute 'Context'
我不知道我在做什么错。任何帮助将不胜感激,谢谢!
我在Ubuntu 14.04.2上遇到与OP相同的问题,而您的解决方案没有帮助。任何其他想法? – portforwardpodcast
不正确。 'libzmq3-dev'依赖于'libzmq3'。你可以检查你自己:'apt-cache show libzmq3-dev | grep取决于。 –