Search code examples
pythonvisual-studio-codeanacondakerneljunit-jupiter

Unable to connect VS Code / Jupiter Notebook to Python-Kernel


I recently started to code with Python and therefore wanted to use Jupiter Notebook, but unfortunately, it doesn't connect to the Python-Kernel. I downloaded Python from the official site and from anaconda:

https://www.python.org/downloads/windows/

https://docs.conda.io/en/latest/miniconda.html

I also tried to set the PATH-Variable but that didn't help either:

Used Systems & Versions:

  • HP ProBook 450 G6, 64-Bit

  • Windows 10 Pro

  • VS Code 1.48

  • Versions of Python I tried: Python 3.8.3 64-Bit (base: conda) - currently installed Python 3.7.9 64-Bit Python 3.8.5 32-Bit

  • current PATH-Variable-Settings: C:\ProgramData\Miniconda3

C:\ProgramData\Miniconda3\Library\mingw-w64\bin

C:\ProgramData\Miniconda3\Library\usr\bin

C:\ProgramData\Miniconda3\Library\bin

C:\ProgramData\Miniconda3\Scripts

Error-Messages:ErrorMessages

Has anyone experienced the same problems?

Thanks for your help!


Solution

  • I have found the answer: https://github.com/microsoft/vscode-python/issues/13701

    I did the following steps:

    • closed vs code entirely
    • ran cmd as administrator
    • executed following command: python -m pip install traitlets==4.3.3 --force-reinstall

    Opened VS Code and tried to connect - and it worked.

    =)