vscode python jedi client: couldn't create connection to server

25.9k views Asked by At

I keep getting this message when I run Jupyter Notebook.

  • comment :

1

  • output:

2

4

There are 4 answers

3
MingJie-MSFT On

Check whether the following code is specified correctly in your setting.json:

"python.languageServer":"Jedi"
0
Matt On

Pylance is now the default language server (see here). As such, I resolved the issue by changing my settings.json to:

"python.languageServer": "Pylance"

You may need to install the Pylance extension, if you don't already have it.

2
FrankZhang On

I met this issue on Ubuntu 18.04 LTS with python interpreter python3.6.9 + VS code python extension 2022.14

  • If I downgrade the VS code python extension to 2022.06, it works.
  • If I install a new version python (e.g. python3.9), it works.

So the reason should be:

The new version python extension is not compatible with old python version 3.6.9.

Solution:

either downgrade the python extension to 2022.06(can be even earlier, not fully tested); or upgrade the python interpreter version.

0
Varun Banka On

i installed an extension named "Pylance" then restarted vs code, it worked