4

(Using latest miniconda + VS Code on 64-bit Windows10:) After clean reinstalling VS Code, I can no longer launch jupyter notebook from within it. When I tried to create a new jupyter file for the first time, the Python extension installed ipykernel in my virtual environment "da38" (my main working environment). Then it stays on Connecting to IPython kernel: Connecting to kernel for an unusually long time, and stops with the error message Unable to start session for kernel Python 3.8.5 64-bit ('da38':conda) (images pasted below). I also removed and re-created da38 environment just in case. Used jupyter many times before with no issues until this new VS Code install today, and an identical setup is working on my other computer. Any help is appreciated. Thanks!

enter image description here

enter image description here

5 Answers 5

7

I had the latest version and below command worked for me

python -m pip install 'traitlets==4.3.3' --force-reinstall
Sign up to request clarification or add additional context in comments.

1 Comment

This worked for me, but why is it that the older version (4.3.3) must be used?
5

I had this same problem. What worked for me is updating ipykernel.

$ pip install ipykernel --upgrade

I also did a few other upgrades just in case.

$ pip install traitlets --upgrade
$ pip install notebook --upgrade

I did not role back to an older version like 'traitlets==4.3.3'.

Comments

3

This issue also occurs on my computer. The solution is to restore the version number of a dependency package "traitlets" of ipython kernel to 4.3.3.

You could try to use "conda list" to view the version of the module traitlets in the current conda environment. If it shows version 5.0, it is recommended that you use version 4.3.3.

enter image description here

Reference: Unable to start session for kernel Python.

2 Comments

Thanks - it worked! Also checked on my other machine - it too has traitlets=4.3.3. By the way, you probably meant 4.3.3 in your first paragraph.
@Manojit Yes, it is 4.3.3, Thank you very much for reminding!
0

If anyone facing same issues now, Can check below steps which helped me to solve this

  • Update and Restart VS code
  • Install latest Jupyter Extension from Extensions.

Comments

0

We need to update "ipykernel" and restart VSC:

pip install ipykernel --upgrade

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.