How to remove the Jupyter extension without losing the Python extension

Viewed 1749

How do I remove the Jupyter extension without losing the Python extension in VS-Code? When I try to uninstall the Jupyter extension it automatically uninstalls the Python extension. I don't want the Jupyter extension, since it takes more time initially to start VS-Code.

1 Answers

To solve the problem follow these steps: (This works on Windows)

  1. Navigate to "$Users\yourUsername\.vscode\extensions
  2. Delete the folder that contains the Jupyter extension
  3. Then open the folder containing the Python extension
  4. Find the file "package.json"
  5. Open it with a text editor
  6. Go all the way down to the end of the file
  7. Remove the jupyter dependency from the extensionDependencies attribute list

Your final extensionDependencies should look like this (assuming you had not installed any other dependencies other than Jupyter)

    "extensionDependencies": [
]
  1. Close Visual Studio Code and Re-open for the changes to have an effect.

For those asking why he couldn't just uninstall both extensions and then install just the Python extension, well..for some weird reason it installs both again.

Edit: You can delete the whole "extensionDependencies" property too, but you have to be careful to delete the comma that exists in the end of the previous attribute. Check here for more on JSON file structure syntactical rules.

Edit 2: As gaviton7 says, in newer versions of VS code the "extensionDependencies" attribute has been renamed in newer versions to "extensionPack"

Related