Failed building wheel for pyzmq. could not build wheels for pyzmq, which is required to install pyproject.toml-based projects

could not build wheels for pyzmq, which is required to install pyproject.toml-based projects.

Things I found on internet didn’t help (such as pip install pyzmq==23.2.1)

image

To reproduce: follow ipywidgets > custom widget tutorial project build steps:
(happens when you run python -m pip install -e .)
https://ipywidgets.readthedocs.io/en/stable/examples/Widget%20Custom.html

Did you find a solution to this?

no unfortunately. How about you?

same question here, my solution is pip install pyzmq to install the latest version :smiley:

@Ziqi_Jia did that solution work for you? it didn’t for me

for what it’s worth:

i had similar problems once which orginated from doubled python packages with different versions.
in my case i had pip and/or setuptools installed via pip as newer versions in my user .local/lib than what were installed by my systems package manager. i remember i had errors with building a wheel to, so maybe it’s a similar problem with your configuration @Terlan

I am getting same error -

**note**: This error originates from a subprocess, and is likely not a problem with pip.

ERROR: Failed building wheel for pyzmq

Successfully built stringcase jupyter-contrib-core jupyter-latex-envs

Failed to build pyzmq

ERROR: Could not build wheels for pyzmq, which is required to install pyproject.toml-based projects

I tried installing the pyzmq separately , it was successful,
The retried my package installation but failed again

I have installed setup tools and wheel again for same python and pip version.

Any luck on this?

@spookster how did you solve it eventually?

i checked via pip list --path /usr/lib/python3.11/site-packages and pip list --path ~/.local/lib/python3.11/site-packages if pip/setuptools are installed in both system and user space.

then i uninstalled setuptools/pip user installations via pip uninstall.

1 Like

In may case, specifying python 3.9 completed the build.
I created an environment with conda like this.
conda create -n ipyemail -c conda-forge jupyterlab cookiecutter nodejs yarn python=3.9