Skip to content
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

pyzmq 26, Windows 11: Bad file descriptor #1981

Open
1 task done
malgarop opened this issue Apr 19, 2024 · 5 comments
Open
1 task done

pyzmq 26, Windows 11: Bad file descriptor #1981

malgarop opened this issue Apr 19, 2024 · 5 comments

Comments

@malgarop
Copy link

This is a pyzmq bug

  • This is a pyzmq-specific bug, not an issue of zmq socket behavior. Don't worry if you're not sure! We'll figure it out together.

What pyzmq version?

26.0.0

What libzmq version?

none

Python version (and how it was installed)

3.12.3

OS

windows 11

What happened?

When installing jupyter on a new windows machine, it will fail to connect to any python3 kernel, with the following error popup: "Error Starting KernelNetworkError when attempting to fetch resource."

To reproduce:
On a Powershell on a Windows 11 machine with python 3.12.3:

'pip install jupyter'
'python -m jupyter notebook' or 'jupyter-lab'
start a new notebook, or open an existing one, with python3 kernel
process fails and error pops up. In the shell I get the following output:
"Bad file descriptor (C:\Users\runneradmin\AppData\Local\Temp\tmp9czwcdbh\build_deps\bundled_libzmq-src\src\epoll.cpp:73)"

It works after I uninstall pyzmq and reinstall the Dec 5, 2023 version:

'pip freeze | findstr pyzmq'
output: "pyzmq==26.0.0"
'pip uninstall pyzmq'
'pip install pyzmq==25.1.2'

Code to reproduce bug

pip install jupyter
python -m jupyter notebook' or 'jupyter-lab

Traceback, if applicable

Bad file descriptor (C:\Users\runneradmin\AppData\Local\Temp\tmp9czwcdbh\build_deps\bundled_libzmq-src\src\epoll.cpp:73)

More info

No response

@minrk
Copy link
Member

minrk commented Apr 19, 2024

Can I ask how you installed pyzmq and Python? Do you have any other Python versions available to test?

Can you run a basic script like:

import zmq
ctx = zmq.Context()
with ctx:
    with ctx.socket(zmq.PUSH) as s:
        s.bind("tcp://127.0.0.1:5555")

@minrk minrk changed the title BUG: jupyter won't work anymore on windows with 15 apr, 26.0.0 release pyzmq 26, Windows 11: Bad file descriptor Apr 22, 2024
@grvstick
Copy link

grvstick commented Apr 22, 2024

same issue here. FYI @minrk, I've just run your code to confirm.

import zmq
ctx = zmq.Context()
with ctx:
    with ctx.socket(zmq.PUSH) as s:
        s.bind("tcp://127.0.0.1:5555")
Bad file descriptor (C:\Users\runneradmin\AppData\Local\Temp\tmpuk6z2au_\build\_deps\bundled_libzmq-src\src\epoll.cpp:73)

Also using python 3.12.3 via microsoft store(WIN 11)

@malgarop
Copy link
Author

malgarop commented Apr 22, 2024

@minrk thanks for your patience, running the scripts you suggested results in:
Bad file descriptor (C:\Users\runneradmin\AppData\Local\Temp\tmps23b75cz\build\_deps\bundled_libzmq-src\src\epoll.cpp:73)

I installed python via Mirosoft store on windows 11. Python pip installed pyzmq for me as a dependency for the module jupyter

@minrk
Copy link
Member

minrk commented Apr 23, 2024

Interesting that you both got it via the Store. Do you have access to another source, e.g. a miniconda install or Python.org installer? Just to test if it's related to the Python installation instead of the environment?

@grvstick
Copy link

@minrk just confirmed that it does not happen with python.org release of 3.12.3, both on jupyter lab and the test code you provided. I've failed to test conda, since jupyter is only seems to be able to run in conda packages, not pip. I wanted to test in pyzmq >= 26.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants