pyzmq: Windows Python wheels: Bad address src\epoll.cpp:100

Hello, recently I set up a new python environment on a new computer as usual, I got automatically installed pyzmq==21.0.2, and I cannot use jupyter notebook, Jupyter lab, vs code at all, the python kernel crashes every time when I open a editor, and after one second, it directly crashes and lose connection to the kernel.

This problem annoyed me for several weeks, and today I saw many people encountered this issue From December 2020 to January 2021. And I have never encountered this issue in the past.

Also, this error message is somewhat not useful and not making sense, finally I realized its pyzmq error. I degraded it to pyzmq==19.0.2 , it finally resolved this issue.

I hope this could be fixed, or if you could push old versions of pyzmq for users to install as dependencies. Thank you very much! IMG_1690

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 6
  • Comments: 45 (16 by maintainers)

Commits related to this issue

Most upvoted comments

I wish to add another findings to this frustrating event of Jupyter Notebook (Python), not able to run in browsers (Chrome, EDGE, FireFox, etc) and in Visual Studio Code. [The stupid error codes, and not able to run Jupyter Notebook locally at Visual Studio Code]

I found out that the real culprit is due to the VPN settings that most people will use.

Next time when you find yourself facing this frustrating event perform the following steps.

  1. go to windows command prompt, and run as administrator
  2. type the following command “netsh winsock reset”
  3. reboot your computer.

This should be a permanent solution, but when the VPN starts to mess up the network settings, all you need to do is to perform the above command. [pyzmq is not the true culprit, I found out that I didn’t actually install version 19.0.2 since my version of Python is 3.9 and above]

Glad to know that my days of frustration with this silly problem have helped many online! It took me a few days of reading online and researching on the problem, until I come across some nice bloke who posted the solution online in youtube.

I tried the simple solution, and Jupyter started to work in all browsers.

  1. go to windows command prompt, and run as administrator
  2. type the following command “netsh winsock reset”
  3. reboot your computer.

I had actually reinstalled conda numerous times, and also tried with different versions of python, and nothing works… damn frustrating, then I came across this thread with the same error message, and I tried the pyzmq downgrade, it worked intermittently… the true cause of the problem is the VPN.

I wish to add another findings to this frustrating event of Jupyter Notebook (Python), not able to run in browsers (Chrome, EDGE, FireFox, etc) and in Visual Studio Code. [The stupid error codes, and not able to run Jupyter Notebook locally at Visual Studio Code]

I found out that the real culprit is due to the VPN settings that most people will use.

Next time when you find yourself facing this frustrating event perform the following steps.

  1. go to windows command prompt, and run as administrator
  2. type the following command “netsh winsock reset”
  3. reboot your computer.

This should be a permanent solution, but when the VPN starts to mess up the network settings, all you need to do is to perform the above command. [pyzmq is not the true culprit, I found out that I didn’t actually install version 19.0.2 since my version of Python is 3.9 and above]

Just another confirmation of the same issue with Jupyter and “bad address” message. After looking all around without a proper solution and reading this thread, this was the only solution. The previous approach downgrading pyzmq was not possible and gave other errors. Precisely, I’m using a VPN, w11, conda 23.7.2 and typical python 3.10 and jupyter installation

The VPN issue sounds about right, I had a PC, freshly installed spyder on it. It works, but right after a VPN was installed, everything started failing, including fresh installations of vscode, new conda envs, non conda venvs, etc, it all traces back down to pyzmq and the epoll bad address issue. @KianSOH 's solution worked perfectly. 1.create a new conda environment based on python 3.8, 2.conda install pytest pyzmq==19.0.2 3.Install spyder/jupyter whatever. I could not believe VPNs would be intefering with jupyter.

image

I wish to add here that for people who have issues logging in with Kernel of Jupyter Lab/Notebook, based on the simple advise of installing / downgrading, using the ANACONDA commands [For people with ANACONDA installed]

conda install pytest pyzmq==19.0.2

This will fix the problem of non linking up with the Kernel! I basically looked through all advise online, and this one works for me!

The VPN issue sounds about right, I had a PC, freshly installed spyder on it. It works, but right after a VPN was installed, everything started failing, including fresh installations of vscode, new conda envs, non conda venvs, etc, it all traces back down to pyzmq and the epoll bad address issue. @KianSOH 's solution worked perfectly. 1.create a new conda environment based on python 3.8, 2.conda install pytest pyzmq==19.0.2 3.Install spyder/jupyter whatever. I could not believe VPNs would be intefering with jupyter.

I have the same problem. After uninstalling VPN, it is ok. I think some VPN software will forward network requests and localhost’s real address is changed

Building libzmq with the following configuration resolves the issue:

-DPOLLER=select -DZMQ_HAVE_IPC=OFF -DZMQ_CV_IMPL=stl11

pyzmq==19.0.2

thanks mate it’s worked it was giving me an error for the first time installing pyzmq==19.0.2 but this time it’s worked finally, after a few days of searching, I got the solution wlah!

I installed the new wheel in an existing environment which is specified as in one of my previous comments but with python==3.9. The installation did not affect the existing zeromq==4.3.4 I had in that environment but maybe now it doesn’t matter. After that it seems to resolve the problem, ie. I can run all the notebooks I previously only could run with pyzmq==19.0.2 and the error in epool.cpp:100 does not come up any more.

The only new thing I have is this warning which is probably a different story (irrelevant for me):

\lib\site-packages\zmq\_future.py:700: RuntimeWarning: Proactor event loop does not implement add
_reader family of methods required for zmq. Registering an additional selector thread for add_reader support via tornado. Use `asyncio.set_event_loop_policy(WindowsSelectorEventLoopPolicy())` to avoid this warni
ng.

and in one case (not deterministically reproducible) I got

Assertion failed: pfd.revents & POLLIN (C:\Users\runneradmin\AppData\Local\Temp\tmp46punxxq\build\_deps\bundled_libzmq-src\src\signaler.cp
p:238)

but it seems the execution continued regardless and completed as success.

I will keep you informed if anything should change after more thorough testing.

Many thanks for looking into this and for your help!

There are now updated wheels with zeromq-4.3.5.

If anyone who can still reproduce this issue can test the wheels available here and report back, that would be a huge help.

pyzmq now has control over the cmake options of the libzmq it bundles in wheels, so there is some hope of resolving it if those wheels don’t work yet.

I’m sorry I’ve never been able to personally reproduce this issue, so I can’t verify the fix myself!

I really hope the new wheels for pyzmq 24.0 fix this. Since I’ve never been able to reproduce the problem, I can’t verify myself. Anyone who has been seeing this who can confirm here would be much appreciated.

Hello, recently I set up a new python environment on a new computer as usual, I got automatically installed pyzmq==21.0.2, and I cannot use jupyter notebook, Jupyter lab, vs code at all, the python kernel crashes every time when I open a editor, and after one second, it directly crashes and lose connection to the kernel.

This problem annoyed me for several weeks, and today I saw many people encountered this issue From December 2020 to January 2021. And I have never encountered this issue in the past.

Also, this error message is somewhat not useful and not making sense, finally I realized its pyzmq error. I degraded it to pyzmq==19.0.2 , it finally resolved this issue.

I hope this could be fixed, or if you could push old versions of pyzmq for users to install as dependencies. Thank you very much! IMG_1690

Thanks for the solution, I’ve fixed it