After updating VSCode to 1.56.1, I get error: "Cannot activate the 'Python' extension because it depends on the 'Jupyter' extension..."

Viewed 3934

After updating VS Code to version 1.56.1, I started getting the following error (in the pop-up window on the bottom right) when opening a python project in VS Code:

Cannot activate the 'Python' extension because it depends on the 'Jupyter' extension, which is not loaded. Would you like to reload the window to load the extension?.

Clicking on "Reload Window" didn't solve the problems, and would just prompt the same error over and over again.

I found this in an update in a SO answer, but reinstalling the jupyter extension didn't solve the problem for me.

3 Answers

I managed to solve my problem by reverting to a previous jupyter extension version. My initial jupyter extension was v2021.5.745244803. I reverted to v2021.5.702919634 and the problem was resolved.

To revert a jupyter extension version:

  1. Got to Extensions (Ctrl + Shift + X).
  2. Click on the extension "Jupyter" from your list of Installed extensions in the Extensions pane on the left.
  3. Alternatively to step 2:
    3.1. Type "jupyter" in the search field above the Extensions pane on the left.
    3.2. Select the extension named "Jupyter" by Microsoft (ms-toolsai.jupyter).
  4. Click the down arrow in the "Uninstall" button underneath the number of downloads and star rating.
  5. Click "Install Another Version..."

Chose a previous version. I chose the version immediately before the latest, and solved the problem for me.

I hope this helps if you run into the same problem.

In case you are looking to avoid the hassle of reverting to an earlier version, you could try installing the plugin using '.vsix' file after manually downloading it from the VS Code marketplace, as it worked for me.

enter image description here

If you are accessing the remote device from a host (via ssh), you may need to scp/ftp the files:

ms-python.python-<version>.vsix 
ms-python.vscode-pylance-<version>.vsix 

to the remote machine, before installing the plugin.

Related