Pyzmq install error

Unable to pip install the latest version of pyzmq workaround: pip install pyzmq==23.2.1 Collecting pyzmq>=17 Downloading pyzmq-24.0.0.tar.gz (1.2 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2...

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.

Already on GitHub?
Sign in
to your account

Comments

@lokesh-sreedhara

Unable to pip install the latest version of pyzmq

workaround: pip install pyzmq==23.2.1

Collecting pyzmq>=17
  Downloading pyzmq-24.0.0.tar.gz (1.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 69.5 MB/s eta 0:00:00
     
      Building wheel for pyzmq (pyproject.toml): started
  Building wheel for pyzmq (pyproject.toml): finished with status 'error'
  error: subprocess-exited-with-error
  
  × Building wheel for pyzmq (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [182 lines of output]
      /tmp/pip-build-env-uxbzujat/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py:262: UserWarning: Unknown distribution option: 'cffi_modules'
        warnings.warn(msg)
      running bdist_wheel
      running build
      running build_py
      copying zmq/__init__.py -> build/lib.linux-x86_64-cpython-39/zmq
      copying zmq/_future.py -> build/lib.linux-x86_64-cpython-39/zmq
      copying zmq/_typing.py -> build/lib.linux-x86_64-cpython-39/zmq
      copying zmq/asyncio.py -> build/lib.linux-x86_64-cpython-39/zmq
      copying zmq/constants.py -> build/lib.linux-x86_64-cpython-39/zmq
      copying zmq/decorators.py -> build/lib.linux-x86_64-cpython-39/zmq
      copying zmq/error.py -> build/lib.linux-x86_64-cpython-39/zmq
      creating build/lib.linux-x86_64-cpython-39/zmq/auth
      copying zmq/auth/__init__.py -> build/lib.linux-x86_64-cpython-39/zmq/auth
      copying zmq/auth/asyncio.py -> build/lib.linux-x86_64-cpython-39/zmq/auth
      copying zmq/auth/base.py -> build/lib.linux-x86_64-cpython-39/zmq/auth
      copying zmq/auth/certs.py -> build/lib.linux-x86_64-cpython-39/zmq/auth
      copying zmq/auth/ioloop.py -> build/lib.linux-x86_64-cpython-39/zmq/auth
      copying zmq/auth/thread.py -> build/lib.linux-x86_64-cpython-39/zmq/auth
      creating build/lib.linux-x86_64-cpython-39/zmq/backend
      copying zmq/backend/__init__.py -> build/lib.linux-x86_64-cpython-39/zmq/backend
      copying zmq/backend/select.py -> build/lib.linux-x86_64-cpython-39/zmq/backend
      creating build/lib.linux-x86_64-cpython-39/zmq/backend/cffi
      copying zmq/backend/cffi/__init__.py -> build/lib.linux-x86_64-cpython-39/zmq/backend/cffi
      copying zmq/backend/cffi/_poll.py -> build/lib.linux-x86_64-cpython-39/zmq/backend/cffi
      copying zmq/backend/cffi/context.py -> build/lib.linux-x86_64-cpython-39/zmq/backend/cffi
      copying zmq/backend/cffi/devices.py -> build/lib.linux-x86_64-cpython-39/zmq/backend/cffi
      copying zmq/backend/cffi/error.py -> build/lib.linux-x86_64-cpython-39/zmq/backend/cffi
      copying zmq/backend/cffi/message.py -> build/lib.linux-x86_64-cpython-39/zmq/backend/cffi
      copying zmq/backend/cffi/socket.py -> build/lib.linux-x86_64-cpython-39/zmq/backend/cffi
      copying zmq/backend/cffi/utils.py -> build/lib.linux-x86_64-cpython-39/zmq/backend/cffi
      creating build/lib.linux-x86_64-cpython-39/zmq/backend/cython
      copying zmq/backend/cython/__init__.py -> build/lib.linux-x86_64-cpython-39/zmq/backend/cython
      creating build/lib.linux-x86_64-cpython-39/zmq/devices
      copying zmq/devices/__init__.py -> build/lib.linux-x86_64-cpython-39/zmq/devices
      copying zmq/devices/basedevice.py -> build/lib.linux-x86_64-cpython-39/zmq/devices
      copying zmq/devices/monitoredqueue.py -> build/lib.linux-x86_64-cpython-39/zmq/devices
      copying zmq/devices/monitoredqueuedevice.py -> build/lib.linux-x86_64-cpython-39/zmq/devices
      copying zmq/devices/proxydevice.py -> build/lib.linux-x86_64-cpython-39/zmq/devices
      copying zmq/devices/proxysteerabledevice.py -> build/lib.linux-x86_64-cpython-39/zmq/devices
      creating build/lib.linux-x86_64-cpython-39/zmq/eventloop
      copying zmq/eventloop/__init__.py -> build/lib.linux-x86_64-cpython-39/zmq/eventloop
      copying zmq/eventloop/_deprecated.py -> build/lib.linux-x86_64-cpython-39/zmq/eventloop
      copying zmq/eventloop/future.py -> build/lib.linux-x86_64-cpython-39/zmq/eventloop
      copying zmq/eventloop/ioloop.py -> build/lib.linux-x86_64-cpython-39/zmq/eventloop
      copying zmq/eventloop/zmqstream.py -> build/lib.linux-x86_64-cpython-39/zmq/eventloop
      creating build/lib.linux-x86_64-cpython-39/zmq/eventloop/minitornado
      copying zmq/eventloop/minitornado/__init__.py -> build/lib.linux-x86_64-cpython-39/zmq/eventloop/minitornado
      copying zmq/eventloop/minitornado/concurrent.py -> build/lib.linux-x86_64-cpython-39/zmq/eventloop/minitornado
      copying zmq/eventloop/minitornado/ioloop.py -> build/lib.linux-x86_64-cpython-39/zmq/eventloop/minitornado
      copying zmq/eventloop/minitornado/log.py -> build/lib.linux-x86_64-cpython-39/zmq/eventloop/minitornado
      copying zmq/eventloop/minitornado/stack_context.py -> build/lib.linux-x86_64-cpython-39/zmq/eventloop/minitornado
      copying zmq/eventloop/minitornado/util.py -> build/lib.linux-x86_64-cpython-39/zmq/eventloop/minitornado
      creating build/lib.linux-x86_64-cpython-39/zmq/eventloop/minitornado/platform
      copying zmq/eventloop/minitornado/platform/__init__.py -> build/lib.linux-x86_64-cpython-39/zmq/eventloop/minitornado/platform
      copying zmq/eventloop/minitornado/platform/auto.py -> build/lib.linux-x86_64-cpython-39/zmq/eventloop/minitornado/platform
      copying zmq/eventloop/minitornado/platform/common.py -> build/lib.linux-x86_64-cpython-39/zmq/eventloop/minitornado/platform
      copying zmq/eventloop/minitornado/platform/interface.py -> build/lib.linux-x86_64-cpython-39/zmq/eventloop/minitornado/platform
      copying zmq/eventloop/minitornado/platform/posix.py -> build/lib.linux-x86_64-cpython-39/zmq/eventloop/minitornado/platform
      copying zmq/eventloop/minitornado/platform/windows.py -> build/lib.linux-x86_64-cpython-39/zmq/eventloop/minitornado/platform
      creating build/lib.linux-x86_64-cpython-39/zmq/green
      copying zmq/green/__init__.py -> build/lib.linux-x86_64-cpython-39/zmq/green
      copying zmq/green/core.py -> build/lib.linux-x86_64-cpython-39/zmq/green
      copying zmq/green/device.py -> build/lib.linux-x86_64-cpython-39/zmq/green
      copying zmq/green/poll.py -> build/lib.linux-x86_64-cpython-39/zmq/green
      creating build/lib.linux-x86_64-cpython-39/zmq/green/eventloop
      copying zmq/green/eventloop/__init__.py -> build/lib.linux-x86_64-cpython-39/zmq/green/eventloop
      copying zmq/green/eventloop/ioloop.py -> build/lib.linux-x86_64-cpython-39/zmq/green/eventloop
      copying zmq/green/eventloop/zmqstream.py -> build/lib.linux-x86_64-cpython-39/zmq/green/eventloop
      creating build/lib.linux-x86_64-cpython-39/zmq/log
      copying zmq/log/__init__.py -> build/lib.linux-x86_64-cpython-39/zmq/log
      copying zmq/log/__main__.py -> build/lib.linux-x86_64-cpython-39/zmq/log
      copying zmq/log/handlers.py -> build/lib.linux-x86_64-cpython-39/zmq/log
      creating build/lib.linux-x86_64-cpython-39/zmq/ssh
      copying zmq/ssh/__init__.py -> build/lib.linux-x86_64-cpython-39/zmq/ssh
      copying zmq/ssh/forward.py -> build/lib.linux-x86_64-cpython-39/zmq/ssh
      copying zmq/ssh/tunnel.py -> build/lib.linux-x86_64-cpython-39/zmq/ssh
      creating build/lib.linux-x86_64-cpython-39/zmq/sugar
      copying zmq/sugar/__init__.py -> build/lib.linux-x86_64-cpython-39/zmq/sugar
      copying zmq/sugar/attrsettr.py -> build/lib.linux-x86_64-cpython-39/zmq/sugar
      copying zmq/sugar/context.py -> build/lib.linux-x86_64-cpython-39/zmq/sugar
      copying zmq/sugar/frame.py -> build/lib.linux-x86_64-cpython-39/zmq/sugar
      copying zmq/sugar/poll.py -> build/lib.linux-x86_64-cpython-39/zmq/sugar
      copying zmq/sugar/socket.py -> build/lib.linux-x86_64-cpython-39/zmq/sugar
      copying zmq/sugar/stopwatch.py -> build/lib.linux-x86_64-cpython-39/zmq/sugar
      copying zmq/sugar/tracker.py -> build/lib.linux-x86_64-cpython-39/zmq/sugar
      copying zmq/sugar/version.py -> build/lib.linux-x86_64-cpython-39/zmq/sugar
      creating build/lib.linux-x86_64-cpython-39/zmq/tests
      copying zmq/tests/__init__.py -> build/lib.linux-x86_64-cpython-39/zmq/tests
      copying zmq/tests/conftest.py -> build/lib.linux-x86_64-cpython-39/zmq/tests
      copying zmq/tests/test_asyncio.py -> build/lib.linux-x86_64-cpython-39/zmq/tests
      copying zmq/tests/test_auth.py -> build/lib.linux-x86_64-cpython-39/zmq/tests
      copying zmq/tests/test_cffi_backend.py -> build/lib.linux-x86_64-cpython-39/zmq/tests
      copying zmq/tests/test_constants.py -> build/lib.linux-x86_64-cpython-39/zmq/tests
      copying zmq/tests/test_context.py -> build/lib.linux-x86_64-cpython-39/zmq/tests
      copying zmq/tests/test_cython.py -> build/lib.linux-x86_64-cpython-39/zmq/tests
      copying zmq/tests/test_decorators.py -> build/lib.linux-x86_64-cpython-39/zmq/tests
      copying zmq/tests/test_device.py -> build/lib.linux-x86_64-cpython-39/zmq/tests
      copying zmq/tests/test_draft.py -> build/lib.linux-x86_64-cpython-39/zmq/tests
      copying zmq/tests/test_error.py -> build/lib.linux-x86_64-cpython-39/zmq/tests
      copying zmq/tests/test_etc.py -> build/lib.linux-x86_64-cpython-39/zmq/tests
      copying zmq/tests/test_ext.py -> build/lib.linux-x86_64-cpython-39/zmq/tests
      copying zmq/tests/test_future.py -> build/lib.linux-x86_64-cpython-39/zmq/tests
      copying zmq/tests/test_imports.py -> build/lib.linux-x86_64-cpython-39/zmq/tests
      copying zmq/tests/test_includes.py -> build/lib.linux-x86_64-cpython-39/zmq/tests
      copying zmq/tests/test_ioloop.py -> build/lib.linux-x86_64-cpython-39/zmq/tests
      copying zmq/tests/test_log.py -> build/lib.linux-x86_64-cpython-39/zmq/tests
      copying zmq/tests/test_message.py -> build/lib.linux-x86_64-cpython-39/zmq/tests
      copying zmq/tests/test_monitor.py -> build/lib.linux-x86_64-cpython-39/zmq/tests
      copying zmq/tests/test_monqueue.py -> build/lib.linux-x86_64-cpython-39/zmq/tests
      copying zmq/tests/test_multipart.py -> build/lib.linux-x86_64-cpython-39/zmq/tests
      copying zmq/tests/test_mypy.py -> build/lib.linux-x86_64-cpython-39/zmq/tests
      copying zmq/tests/test_pair.py -> build/lib.linux-x86_64-cpython-39/zmq/tests
      copying zmq/tests/test_poll.py -> build/lib.linux-x86_64-cpython-39/zmq/tests
      copying zmq/tests/test_proxy_steerable.py -> build/lib.linux-x86_64-cpython-39/zmq/tests
      copying zmq/tests/test_pubsub.py -> build/lib.linux-x86_64-cpython-39/zmq/tests
      copying zmq/tests/test_reqrep.py -> build/lib.linux-x86_64-cpython-39/zmq/tests
      copying zmq/tests/test_retry_eintr.py -> build/lib.linux-x86_64-cpython-39/zmq/tests
      copying zmq/tests/test_security.py -> build/lib.linux-x86_64-cpython-39/zmq/tests
      copying zmq/tests/test_socket.py -> build/lib.linux-x86_64-cpython-39/zmq/tests
      copying zmq/tests/test_ssh.py -> build/lib.linux-x86_64-cpython-39/zmq/tests
      copying zmq/tests/test_version.py -> build/lib.linux-x86_64-cpython-39/zmq/tests
      copying zmq/tests/test_win32_shim.py -> build/lib.linux-x86_64-cpython-39/zmq/tests
      copying zmq/tests/test_z85.py -> build/lib.linux-x86_64-cpython-39/zmq/tests
      copying zmq/tests/test_zmqstream.py -> build/lib.linux-x86_64-cpython-39/zmq/tests
      creating build/lib.linux-x86_64-cpython-39/zmq/utils
      copying zmq/utils/__init__.py -> build/lib.linux-x86_64-cpython-39/zmq/utils
      copying zmq/utils/garbage.py -> build/lib.linux-x86_64-cpython-39/zmq/utils
      copying zmq/utils/interop.py -> build/lib.linux-x86_64-cpython-39/zmq/utils
      copying zmq/utils/jsonapi.py -> build/lib.linux-x86_64-cpython-39/zmq/utils
      copying zmq/utils/monitor.py -> build/lib.linux-x86_64-cpython-39/zmq/utils
      copying zmq/utils/strtypes.py -> build/lib.linux-x86_64-cpython-39/zmq/utils
      copying zmq/utils/win32.py -> build/lib.linux-x86_64-cpython-39/zmq/utils
      copying zmq/utils/z85.py -> build/lib.linux-x86_64-cpython-39/zmq/utils
      copying zmq/__init__.pxd -> build/lib.linux-x86_64-cpython-39/zmq
      copying zmq/__init__.pyi -> build/lib.linux-x86_64-cpython-39/zmq
      copying zmq/py.typed -> build/lib.linux-x86_64-cpython-39/zmq
      copying zmq/backend/__init__.pyi -> build/lib.linux-x86_64-cpython-39/zmq/backend
      copying zmq/backend/cffi/_cdefs.h -> build/lib.linux-x86_64-cpython-39/zmq/backend/cffi
      copying zmq/backend/cython/__init__.pxd -> build/lib.linux-x86_64-cpython-39/zmq/backend/cython
      copying zmq/backend/cython/checkrc.pxd -> build/lib.linux-x86_64-cpython-39/zmq/backend/cython
      copying zmq/backend/cython/context.pxd -> build/lib.linux-x86_64-cpython-39/zmq/backend/cython
      copying zmq/backend/cython/libzmq.pxd -> build/lib.linux-x86_64-cpython-39/zmq/backend/cython
      copying zmq/backend/cython/message.pxd -> build/lib.linux-x86_64-cpython-39/zmq/backend/cython
      copying zmq/backend/cython/socket.pxd -> build/lib.linux-x86_64-cpython-39/zmq/backend/cython
      copying zmq/backend/cython/constant_enums.pxi -> build/lib.linux-x86_64-cpython-39/zmq/backend/cython
      copying zmq/devices/monitoredqueue.pxd -> build/lib.linux-x86_64-cpython-39/zmq/devices
      copying zmq/sugar/__init__.pyi -> build/lib.linux-x86_64-cpython-39/zmq/sugar
      copying zmq/utils/buffers.pxd -> build/lib.linux-x86_64-cpython-39/zmq/utils
      copying zmq/utils/getpid_compat.h -> build/lib.linux-x86_64-cpython-39/zmq/utils
      copying zmq/utils/ipcmaxlen.h -> build/lib.linux-x86_64-cpython-39/zmq/utils
      copying zmq/utils/mutex.h -> build/lib.linux-x86_64-cpython-39/zmq/utils
      copying zmq/utils/pyversion_compat.h -> build/lib.linux-x86_64-cpython-39/zmq/utils
      copying zmq/utils/zmq_compat.h -> build/lib.linux-x86_64-cpython-39/zmq/utils
      copying zmq/utils/compiler.json -> build/lib.linux-x86_64-cpython-39/zmq/utils
      copying zmq/utils/config.json -> build/lib.linux-x86_64-cpython-39/zmq/utils
      running build_ext
      running configure
      Using bundled libzmq
      already have bundled/zeromq
      already have platform.hpp
      checking for timer_create
      ************************************************
      ************************************************
      gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include/python3.9 -c /tmp/timer_create4e_m80cg.c -o tmp/timer_create4e_m80cg.o
      /tmp/timer_create4e_m80cg.c: In function ‘main’:
      /tmp/timer_create4e_m80cg.c:2:5: warning: implicit declaration of function ‘timer_create’ [-Wimplicit-function-declaration]
           timer_create();
           ^~~~~~~~~~~~
      gcc -pthread tmp/timer_create4e_m80cg.o -L/usr/local/lib -o a.out
      tmp/timer_create4e_m80cg.o: In function `main':
      /tmp/timer_create4e_m80cg.c:2: undefined reference to `timer_create'
      collect2: error: ld returned 1 exit status
      no timer_create, linking librt
      ************************************************
      building 'zmq.libzmq' extension
      creating build/temp.linux-x86_64-cpython-39/buildutils
      creating build/temp.linux-x86_64-cpython-39/bundled
      creating build/temp.linux-x86_64-cpython-39/bundled/zeromq
      creating build/temp.linux-x86_64-cpython-39/bundled/zeromq/src
      g++ -std=c++11 -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DZMQ_HAVE_CURVE=1 -DZMQ_USE_TWEETNACL=1 -DZMQ_USE_EPOLL=1 -DZMQ_IOTHREADS_USE_EPOLL=1 -DZMQ_POLL_BASED_ON_POLL=1 -Ibundled/zeromq/include -Ibundled -I/usr/local/include/python3.9 -c buildutils/initlibzmq.cpp -o build/temp.linux-x86_64-cpython-39/buildutils/initlibzmq.o
      error: command 'g++' failed: No such file or directory
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pyzmq
Successfully built ibm-db
Failed to build pyzmq
ERROR: Could not build wheels for pyzmq, which is required to install pyproject.toml-based projects
The command '/bin/sh -c mkdir -p /usr/src/ &&     mkdir -p /opt/ibm/pmlib &&     mkdir -p /project_data/data_asset/ &&     chmod -R 777 /opt/ibm/pmlib &&     mkdir -p /.local &&     chmod -R 777 /.local &&     pip3 install --upgrade pip &&     pip3 install -r requirements.txt' returned a non-zero code: 1

anpaz

added a commit
to microsoft/iqsharp
that referenced
this issue

Sep 15, 2022

@anpaz

@brando90

this creates an issue for the arm wheels as well. I can confirm that before thi released it worked in my docker container on my m1 mac and docker container.

@brando90

pip install pyzmq==23.1.2

you mean:

pip install pyzmq==23.2.1

@lokesh-sreedhara

pip install pyzmq==23.1.2

you mean:

pip install pyzmq==23.2.1

Sorry yea, 23.2.1 seems to be working

@brando90

@blink1073

I think part of the issue is that pyzmq 23.0 shipped with:

  • *manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • *manylinux_2_17_i686.manylinux2014_i686.whl
  • *manylinux_2_17_aarch64.manylinux2014_aarch64.whl

And 24.0 ships with only *manylinux_2_17_i686.manylinux2014_i686.whl

@blink1073

anpaz

added a commit
to microsoft/iqsharp
that referenced
this issue

Sep 15, 2022

@anpaz

@minrk

@minrk

closing as duplicate of #1763

@ostefano

@minrk what are the steps to make the build succeed locally?

@minrk

pip install pyzmq works just about everywhere I’m aware of. Please open a new Issue if it fails! The only requirements are:

  1. a compiler (see above 'g++' failed: No such file or directory), and
  2. Python headers, e.g. python3-dev when installed via apt (fatal error: Python.h: No such file or directory reported in BUG: Wheels not installing properly on CIs #1763)

These are the same requirements for all Python extensions, not specific to pyzmq.

There are a few less common environments where libzmq must be installed first (e.g. some freebsd versions), but mainstream linux, mac, Windows should all work if you can build any Python extensions.

sf-project-io

pushed a commit
to redhat-cip/dci-openshift-agent
that referenced
this issue

Sep 16, 2022

@tonyskapunk

This reverts commit 0dfd8a8.

Reason for revert: Issue with pyzmq has been fixed upstream

zeromq/pyzmq#1764

Change-Id: I9c6023cff12ba7f7b350b84e60cf0d477e875782

How to install Python paackage pyzmq properly?

I searched in Synapic package manager in vain.

Tim's user avatar

Tim

31.5k24 gold badges114 silver badges176 bronze badges

asked Feb 1, 2012 at 15:05

qazwsx's user avatar

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».

answered Feb 1, 2012 at 15:50

xubuntix's user avatar

xubuntixxubuntix

5,54023 silver badges40 bronze badges

1

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

answered Mar 4, 2015 at 19:42

HD189733b's user avatar

HD189733bHD189733b

4634 silver badges11 bronze badges

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 … .

answered Oct 27, 2013 at 14:09

Gopal's user avatar

GopalGopal

393 bronze badges

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

answered Feb 1, 2012 at 15:41

krlmlr's user avatar

krlmlrkrlmlr

3,2624 gold badges33 silver badges55 bronze badges

4

Why not try the later libzmq3 lib + dev tools:

sudo apt-get install --reinstall libzmq3 libzmq3-dev

answered Mar 1, 2014 at 21:28

Peter's user avatar

PeterPeter

111 bronze badge

I am trying to get ipython notebook run.
I already installed pyzmq.
Do you know why it’s still giving this error?

1) Solution

The only reason you would be seeing that error (having manually installed pyzmq) is if pyzmq was installed to a different pythonpath than where ipython is running from.

If you followed the install instructions, you should have no problems:

easy_install ipython pyzmq tornado
# or
pip install ipython pyzmq tornado

It is also possible that the installer saw the dependency already satisfied in another location and didn’t do anything, and then ipython might be running with a different pythonpath that isn’t seeing it. You can force an upgrade of everything:

easy_install -U ipython pyzmq tornado
2) Solution
pip3 uninstall pyzmq
pip3 install pyzmq

Worked for me

3) Solution

Try the following:

pip3 install --upgrade pip
pip3 install jupyter

The above assumes you have aliased pip to pip3.

4) Solution

check what version on python you installed it with

python --version

When you run the application make sure you are using that same version you used to install it with.

The problem for me was that I installed it for python 3.6 but ran it under python 2.7

5) Solution

I have all the packages installed & it also shows up in the path but does throw the same error

[email protected]:~$ python
Python 2.7.3 (default, Feb 27 2014, 19:58:35) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/usr/share/pyshared/zmq', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/pymodules/python2.7']
>>> 
[email protected]:~$ ls /usr/share/pyshared/zmq/
core  devices  eventloop  green  __init__.py  log  ssh  tests  utils  web
[email protected]:~$ less /usr/share/pyshared/zmq/__init__.py 
[email protected]:~$ python
Python 2.7.3 (default, Feb 27 2014, 19:58:35) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import zmq
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named zmq
>>> 
[email protected]:~$ dpkg -l|grep zmq
ii  libzmq3                                 3.2.2+dfsg-1lucid                          lightweight messaging kernel (shared library)
ii  python-zmq                              2.2.0.1-1lucid3                            0MQ is a fast messaging library
[email protected]:~$ 
6) Solution

you should add Phython path to windows local variable PATH before install zmq

7) Solution

For me the solution was to rename my script from zmq.py to anything else.

This happens because using the name zmq.py crates a name conflict with the package as python tries to include the script itself rather than the library as scripts have priority in the include hierarchy.

8) Solution

I had a file that was trying to import zmq that was throwing:

ModuleNotFoundError: No module named 'zmq'

But pip install zmq or pip install pyzmq kept telling me I had a version already installed, and thus Requirement already satisfied at Library/blahblah/Python/3.6 …

I’ve already aliased pip3 to pip, but trying pip3 didn’t work either

I wound up having to reset my $PYTHONPATH and deleted that Python 3.6 install I didn’t actually need.

After that pip install pyzmq STILL didn’t work though.

What finally worked was pip3 install zmq … Weird since I already had that aliased, but something w/the paths might still be screwy.

9) Solution

On Ubuntu 20.04 and Python 3.9, this did the trick for me:

sudo apt-get install python3-zmq

Source: https://askubuntu.com/a/100543

Comments Section

How did you install ipython? The deps should come with it.

on debian is #apt-get install python-zmq

Only if you want to use the debian package manager. You can still use easy_install or pip. They are generic python package managers.

The error I have is no module named ‘zmq.ipkernel’

had to upgrade the package python-zmq_2.1.11-1_amd64.deb and it worked packages.ubuntu.com/precise/amd64/python-zmq/download (http://packages.ubuntu.com/precise/amd64/python-zmq/download)

Welcome to Stack Overflow! While you may have solved this user’s problem, code-only answers are not very helpful to users who come to this question in the future. Please edit your answer to explain why your code solves the original problem.

Related Topics
python
ipython

Mentions
Jdi
Coatless
Sa A
Omarflorez
Marco Rubio
Jabir Ahmed
Zahra Khoobi
Jk Abrams

References
stackoverflow.com/questions/11892497/already-installed-pyzmq-but-still-getting-importerror-no-module-named-zmq

akay0402

Posts: 15
Joined: Sat Apr 06, 2019 12:12 pm

Unable to install pyzmq and RPi.GPIO from requirements.txt

Hi Team,

I’m trying to install «pyzmq» and «RPi.GPIO» for a project
I have a raspberry pi zero (Model: WH)
Raspbian Stretch lite installed

I’m using the below command

Code: Select all

pip install -r "${DIR}/requirements.txt"
  • pyzmq==15.2.0
  • RPi.GPIO==0.5.11

Failed building wheel for pyzmq
Failed building wheel for RPi.GPIO

The code I’m working on is from this url https://github.com/nathanpjones/GaragePi

I’m fairly new to Python and any help would be greatly appreciated

Thanks
Arul.



User avatar

croston

Posts: 723
Joined: Sat Nov 26, 2011 12:33 pm
Location: Blackpool

Re: Unable to install pyzmq and RPi.GPIO from requirements.txt

Sat Apr 06, 2019 1:47 pm

The latest version of RPi.GPIO is 0.6.5. The version you are trying to install is 0.5.11, which is four years old. This is not your immediate problem however but it shows just how out of date the project instructions are.

Things to try:
1) sudo apt install python3-dev
2) Change requirements.txt to remove ‘==version’ from RPi.GPIO and pyzmq lines


akay0402

Posts: 15
Joined: Sat Apr 06, 2019 12:12 pm

Re: Unable to install pyzmq and RPi.GPIO from requirements.txt

Sat Apr 06, 2019 10:16 pm

croston wrote: ↑

Sat Apr 06, 2019 1:47 pm


The latest version of RPi.GPIO is 0.6.5. The version you are trying to install is 0.5.11, which is four years old. This is not your immediate problem however but it shows just how out of date the project instructions are.

Things to try:
1) sudo apt install python3-dev
2) Change requirements.txt to remove ‘==version’ from RPi.GPIO and pyzmq lines

Hi Croston,

This worked perfectly
However now, I don’t know how to proceed

the installation completed successfully (All done!)
But I don’t know how I access the webportal from here. I tried accessing (http://192.x.x.x or https://192.x.x.x), but there’s no webpage there and it refused to connect

The garagepi service was running

Although lighttpd service had failed

And also since the installation I had rebooted the pi, and don’t know how to start everything

Thanks,
Arul.


Return to “Python”

Aller au contenu

Here is the solution to solve ERROR: Could not build wheels for pyzmq, argon2-cffi which use PEP 517 and cannot be installed directly.

ERROR: Could not build wheels for pyzmq, argon2-cffi which use PEP 517 and cannot be installed directly

Programme technologie 6ème

To avoid this issue, we must have both Pyzmq and argon2-cffi installed. If the latter is installed separately, the two pyzmq_install scripts will create these pyzmq_install directories and instruct the interpreter to compile the first pyzmq_install, thereby allowing the second Pyzmq_install program not to call ap::execute before calling ap::exec (i.e. calling ap::execute.py, etc). Note: if an interpreter is not already running, the script can be added to a list and call ap::execute with only one argument. For more information, see our How-To instructions. To build a wheel, let Pyzmq build it automatically using the following command: — pyzmq-setup (use pyzmq (Pyzmq (pyzmq build-wheel Pyzmq)))) Now, we can have both wheels installed to the machine: yarn build /opt/* Pyzmq install wheel wheel How to configure your device with pwm Note: you need Debian-based GNU/Linux distribution on which to install a PDP (see Installation instructions).

Introduction :

 sudo apt-get install python3.9 python3.9-dev 

You can follow along with this tutorial (I use Python 2.7.6) as a standalone guide to installing python2.7.1 and using the latest version of python2.7.x. Also be sure to view our full guide to installing and configuring Python 2.7.x on x86. Note: this tutorial assumes you already have PyPi configured sudo pip install py Useful Python Installation Tool (PYTHONX OR BASH) Here’s the full list of packages needed to install python2.7 to all the Raspberry Pi modules. Each is listed by its default release. If you need any further help, please read our Getting started guide. How to Installing Python on your Raspberry Pi¶ Let’s start with a simple introduction to PYTHONX and use it to configure your computer. Now, the best way to install Python on your Raspberry Pi seems to come from our article in PyPi.org.

ERROR: Could not build wheels for pyzmq, argon2-cffi which use PEP 517 and cannot be installed directly

External links :

https://www.w3schools.com/python/

https://pythonprogramming.net/

https://www.python.org/

https://128mots.com/index.php/2021/03/16/tri-fusion-python/embed/#?secret=3jjT6bPEJ4 https://128mots.com/index.php/2021/03/16/tri-fusion-python/

Понравилась статья? Поделить с друзьями:
  • Qt error message box
  • Pywintypes com error python
  • Pyuic5 error one input ui file must be specified
  • Qt error 1073741515
  • Qt does not name a type ошибка