How to install Python package pyzmq properly?
How to install Python paackage pyzmq properly?
I searched in Synapic package manager in vain.
Solution 1:
apt-cache search python zmq
returns
python-zmq - Python bindings for 0MQ library
python-zmq-dbg - Python bindings for 0MQ library - debugging files
Is this what you are looking for? Then
apt-get install python-zmq
should work.
For future searches:
Python modules in Debian and Ubuntu are often named differently:
python-<module name>
where <module name
> often does not contain "py" or "python".
Solution 2:
I got an error message like this when I tried to run ipython notebook on ubuntu 12.04
ImportError: IPython.html requires pyzmq >= 13, but you have 2.1.11
I tried
sudo pip uninstall pyzmq
sudo pip install pyzmq
but it didn't work. Finally, I solve the problem by
sudo pip install --upgrade pyzmq
Solution 3:
sudo apt-get install libzmq-dev
sudo easy_install pyzmq
This installed 2.2.0 version of libzmq-dev. pyzmq complained that it was 3.2.0 and features beyond 2.2.0 could not be used (since its base libzmq was 2.2.0). Tried loading it in python and it gave a whole bunch of errors.
So:
apt-get purge libzmq-dev
and installed libzmq after doing a git clone from the zmq git site. It installed the 3.2.0 version of libzmq just fine. However, trying to then install pyzmq gave errors like "timer_create undefined". One site said, I needed to update my Cython - which I did .. to ver. 19.x. Still same error. So uninstalled libzmq and pyzmq again.
Did a clean install using
sudo apt-get install python-zmq
This did a correct install -- but of an older version of 2.2.0. Ok, so I have something better than nothing, I suppose.
Why does it have to be so damn hard ... grrrrr ... .
Solution 4:
Consider using easy_install
, perhaps in connection with a Python virtual environment. You need to install the libzmq-dev
package so that the Python package compiles.
sudo apt-get install libzmq-dev
virtualenv ~/test-ve
source ~/test-ve/bin/activate
easy_install pyzmq
Note the absence of sudo
for the easy_install
call, this is due to the Python virtual environment. You need to activate the virtualenv before running the Python code, though. For systemwide installation, simply do
sudo apt-get install libzmq-dev
sudo easy_install pyzmq
Solution 5:
Why not try the later libzmq3 lib + dev tools:
sudo apt-get install --reinstall libzmq3 libzmq3-dev