Jupyter notebook error: "bad file descriptor" error and debugger warnings related to frozen modules

Please read Getting good answers to your questions and use it as a guide for future posts.

Mostly what you post about in the screenshot is just a warning, not an error. These are very distinct concepts. Much of that is covered here if you search with ‘frozen modules’ on this forum.

The part about “And also the code I typed can’t be runned by Python 3 (ipykernel)” is more troubling then the warning. However, you don’t share much about this. Along this line…
How are you starting Jupyter? Because you are using the Anaconda Distribution, you should ideally be starting up the Anaconda Navigator and using that to launch Jupyter that Anaconda installed.
I suspect things not working when you try to execute code is due to your system being messed up with competing Python, or you are starting things wrong (see above), as evidenced by seeing Jupyter linked to AppData and not seeing Anaconda. But maybe it was above the tiny portion of what you shared in your screenshot? (This is a big part of why screenshots are strongly discouraged. Just copy and paste the COMPLETE text code.) For example, when I start up on my Mac, I see something like this:

/Users/wayne/anaconda3/bin/jupyter_mac.command ; exit;                          
(base) wayne@SLab-MacBook-Pro2019 ~ % /Users/wayne/anaconda3/bin/jupyter_mac.command ; exit;
[W 11:28:06.753 NotebookApp] Loading JupyterLab as a classic notebook (v6) extension.
[I 2024-01-24 11:28:06.758 LabApp] JupyterLab extension loaded from /Users/wayne/anaconda3/lib/python3.10/site-packages/jupyterlab
[I 2024-01-24 11:28:06.758 LabApp] JupyterLab application directory is /Users/wayne/anaconda3/share/jupyter/lab
[I 11:28:10.392 NotebookApp] Serving notebooks from local directory: /Users/wayne
[I 11:28:10.393 NotebookApp] Jupyter Notebook 6.5.2 is running at:
[I 11:28:10.393 NotebookApp] http://localhost:8888/?token=0a..........
[I 11:28:10.393 NotebookApp]  or http://127.0.0.1:8888/?token=0a..........
[I 11:28:10.393 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 11:28:10.397 NotebookApp] 
    
    To access the notebook, open this file in a browser:
        file:///Users/wayne/Library/Jupyter/runtime/nbserver-1806-open.html
    Or copy and paste one of these URLs:

Notice you don’t see anything about AppData which is usually linked to Python installed different ways. And you will notice you see anaconda3/bin/jupyter in part of the paths.
But maybe it is simply explained by the fact you didn’t include all the details? Or it could be a Windows difference, perhaps? (So don’t maybe worry too much until some Windows person chimes in.)

As for the bad descriptor file did you look into here? In that case it was updates that caused issues. Had you had Anaconda installed on that computer before and not known and not cleaned things up adequately before installing it again?

1 Like