pyzmq installation error

爱⌒轻易说出口 提交于 2019-12-01 13:07:40

问题


I receive an error when trying to import zmq:

Traceback (most recent call last):   File "BasicPub.py", line 1, in <module>
    import zmq   File "/home/przemek/Enthought/Canopy_32bit/User/lib/python2.7/site-packages/zmq/__init__.py", line 66, in <module>
    from zmq import backend   File "/home/przemek/Enthought/Canopy_32bit/User/lib/python2.7/site-packages/zmq/backend/__init__.py", line 40, in <module>
    reraise(*exc_info)   File "/home/przemek/Enthought/Canopy_32bit/User/lib/python2.7/site-packages/zmq/backend/__init__.py", line 27, in <module>
    _ns = select_backend(first)   File "/home/przemek/Enthought/Canopy_32bit/User/lib/python2.7/site-packages/zmq/backend/select.py", line 27, in select_backend
    mod = __import__(name, fromlist=public_api)   File "/home/przemek/Enthought/Canopy_32bit/User/lib/python2.7/site-packages/zmq/backend/cython/__init__.py", line 6, in <module>
    from . import (constants, error, message, context, ImportError: /home/przemek/Enthought/Canopy_32bit/User/lib/python2.7/site-packages/zmq/backend/cython/message.so: undefined symbol: zmq_msg_gets

Someone has suggested that I should completely remove zmq and reinstall it.

I have tried to do it with pip but it seems that in some config files remain. I have used locate and I manually removed some directories. I thought that it would help but after reinstallation still I have an error. I am using Python2.7 and Ubuntu 14.04.


回答1:


You can try the following:

sudo rm /usr/local/lib/libzmq*
sudo rm /usr/local/include/zmq.h

Since these are the two locations that ZeroMQ's libzmq installs into.




回答2:


This link provides a few options on how to uninstall zeromq if you use a Debian operating system.

You would need to use the purge command:

sudo apt-get purge --auto-remove python-zmq



回答3:


You probably installed it using the source ditribution. To undo this, cd to the build directory and type:

make uninstall


来源:https://stackoverflow.com/questions/34839968/pyzmq-installation-error

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!