skip to Main Content

Visual studio code (VS Code) is not running ipython notebook.

What I did,

  1. VS Code autocreated the .venv from python 3.12.3 global kernal
  2. It installed all necessary dependencies like jupyter
  3. I installed pandas using pip3 because I need that.
  4. When I try to run any cell it shows the error in screenshot

Error screenshot

The logs shows like this

22:14:06.516 [error] Error in execution Error: The kernel died. Error: Bad file descriptor (C:UsersrunneradminAppDataLocalTemptmpw8fxpxarbuild_depsbundled_libzmq-srcsrcepoll.cpp:73)... View Jupyter [log](command:jupyter.viewOutput) for further details.

This path C:Usersrunneradmin doesn’t exists too.

Want to know if I am doing anything wrong here?

  1. I have tried installing all sort of Pip install -U jypyter and other stuffs available online
  2. tried installing and uninstalling python env itself
  3. tried global env and vistual environment, tried activating it manually too

2

Answers


  1. There’s a similar issue in github. This seems to be a pyzmq problem.

    You could try to run the following codes to reinstall pyzmq in your terminal and wait for the latest version fix:

    python -m pip uninstall pyzmq
    pip install pyzmq==25.1.2
    
    Login or Signup to reply.
  2. This worked for me. In particular
    Interestingly I had to use this fix every single time I launched the notebook. And this was very annoying.

    1. I uninstalled the ms store python app.
    2. Downloaded python from the python.org site
    3. Installed the python .exe file and added it to PATH during installation
    4. Installed the jupyter notebook again
    5. Added the jupyter notebook to PATH as well
      and everything good.

    Launched the jupyter notebook and no more bad file descriptor error

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search