skip to Main Content

enter image description here

I just downloaded vscode using homebrew and install [email protected] using homebrew as well. I used pip3 install jupyter as I saw other recommend to fix this issue and still no luck. I have downloaded all the extensions on vscode and I have set the kernal to homebrew version of python and I still recieve this issue. Note that I have used notebooks in the past and have never gotten this issue so I am not really sure what it is this time. I have not installed anaconda.

I have tried uninstalling and installing the extensions but no luck. I have tried to pip3 uninstall jupyter, pip3 uninstall notebook and reinstall them and still no luck. I have tried to change the kernal to the default python3 on the mac and still nothing. My mac is m1 running on Ventura 13.2. I am able to run python code on regular python files just not using jupyter notebook. I followed the instructions how to set it up on vscode website but I got this error.

4

Answers


  1. I had the same issue, running on m1 mac (Ventura 13.2). If you aren’t already, make sure you are utilising a python virtual environment:

    # Create a python virtual environment
    $ python -m venv venv
    # Activate your python virtual environment
    $ source venv/bin/activate
    

    Form your VSCode Command Palette (Shift+Command+P), search and then choose

    Jupyter: Select Interpreter to Start Jupyter Server

    You should then select the python version that is associated to your virtual environment (venv).

    Login or Signup to reply.
  2. I have same issue using VSCode on Mac OS.

    VSCode’s ‘Jupyter’ plugin is broken, causing VSCode unable to bind with python interpreter. Downgrading from v2023.1.2000312134 to v2022.11.1003412109 fixed my issue.

    Downgrade to the previous version

    Login or Signup to reply.
  3. I have a very similar set-up to yours, and the same issue was driving me nuts. The fix was very straightforward, though, just make sure to do the two following steps:

    • On VS Code’s Command Palette search for and click on "Jupyter: Select Interpreter to Start Jupyter Server", and then select the interpreter to coincide to the one you’re using for Python and where you know you can work with Jupyter.
    • To double-check, with your .ipynb file open you should see the chosen environment on the top right selector. If it isn’t, then make sure to select it there as well.

    If VS Code recommends installing Jupyter click accept and do so as well.

    Finally, I would recommend you check out Poetry instead for managing both package dependencies as well as virtual environments. I find it makes the whole workflow more tidy.

    VS Code on Mac OS Command Palette screenshot

    Top-right VS Code window screenshot of an .ipynb file

    Login or Signup to reply.
  4. I had the exact same issue, in my case:

    what helped me -> I did a VS code update, restarted the VS code.

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