19

My code is not working in vscode when I click to run code I see this error:

Sorry, something went wrong activating IntelliCode support for Python. Please check the "Python" and "VS IntelliCode" output windows for details.

and when I tried to rerun the code I saw this message;

Code is already running

The code doesn't stop when I click on ctrl+c so I have to close the editor and open it back. I don't understand why this happened, please help.

2
  • Is your code running inside of threads? Commented Aug 3, 2021 at 13:43
  • no ,it is simple code @thethiny Commented Aug 3, 2021 at 13:44

6 Answers 6

10

I would just like to add a few helpful links:

Intellicode Issue 57

Intellicode Issue 266

Gitmemory issue 486082039

For a lot of people, it just began working after a few tries randomly. See this text (quoted from issue 57):

There's a race condition in the activation of both the IntelliCode and Python language server extensions. Even if the Python extension is loaded, the language server that the extension spins up might not be fully initialized yet. So if the Python extension loads, then the IntelliCode extension, then the Python language server initializes, we will have this problem.

For some people, it was working to reload VS Intellicode pack following the reinstall the Python extension pack.

Thank you.

Sign up to request clarification or add additional context in comments.

3 Comments

I just reinstalled python extension and reloaded and it worked.
In the extensions menu was already a reload button under python. Clicking it fixed the issue for me :)
For me what worked was uninstalling python and then reinstalling it
7
  • First of all find your Python installation path
  • Copy it

Then in VSCode

  1. Open settings
  2. Extensions
  3. Python
  4. Default Interpreter Path

And paste the full path to your Python installation folder. For example:

X:/Program Files/Python310

If it didn't work immediately, try reloading VSCode.

(P.S. Should work without any reloads)

Comments

3

Go to Extensions, then search for the Python extension, then switch to release.

2 Comments

This worked for me. I'm using code-insiders and all python extenstions suddenly started failing. Thanks Hossein.
I just reinstalled python extension and it worked.
1
  1. Make sure to have Pylance installed (intellisense support for Python)
  2. Make sure to be into the tab for any python file For VS Code, and locate the {} Python icon on the bottom row. Click over the {} icon, and then click over Select Interpreter. Just after that, make sure to input the desired python path, wait for a few seconds in the current python tab, and finally Pylance will be doing its job👌

1 Comment

Installing Pylance extension fixed the issue.
0

Going to the Python extension in the store (ms-python.python), then update the extension or switch to (pre-release) and restart VSCode fix the problem for me

Comments

-1

Press CTRL+Shift+P in VS Code, and select the default Python interpreter to fix the issue.

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.