question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot uninstall 'Jupyter' extension. 'Python' extension depends on this.

See original GitHub issue

Environment data

  • VS Code version: 1.55.2
  • Jupyter Extension version (available under the Extensions sidebar): v2021.5.745244803
  • Python Extension version (available under the Extensions sidebar): v2021.3.680753044
  • OS (Windows | Mac | Linux distro) and version: Mac 11.2.3
  • Python and/or Anaconda version: 3.9.4
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): N/A
  • Jupyter server running: Local | Remote | N/A

Expected behaviour

Can uninstall Jupyter without having to uninstall other extensions… notably the Python extension, which I still very much want.

Actual behaviour

When attempting to uninstall, I got the error message in the title and repeated below:

Cannot uninstall 'Jupyter' extension. 'Python' extension depends on this.

Steps to reproduce:

  1. Install the Python extension on VS Code
  2. Install the Jupyter extension
  3. Attempt to uninstall the Jupyter extension

(I confess, I am not sure if this is all that is required. I have been using VS Code with both installed for over a year. But Jupyter started causing problems with the IDE, so I wanted to uninstall it.)

Logs

I have no log for the attempt to uninstall… there is no log, just the dialog box. However, below is a log for the Python extension hanging, for reasons which I think are due to the Jupyter extension not loading properly.

Regardless, I would still like to be able to remove the Jupyter extension without removing the Python extension. It seems that Jupyter should rely upon Python, not vice-versa.

File: ms-python.python-unresponsive.cpuprofile.txt

{
    "nodes": [
        {
            "id": 1,
            "callFrame": {
                "functionName": "(root)",
                "scriptId": "0",
                "url": "",
                "lineNumber": -1,
                "columnNumber": -1
            },
            "hitCount": 0,
            "children": [
                2
            ]
        },
        {
            "id": 2,
            "callFrame": {
                "functionName": "processTicksAndRejections",
                "scriptId": "22",
                "url": "internal/process/task_queues.js",
                "lineNumber": 68,
                "columnNumber": 34
            },
            "hitCount": 0,
            "children": [
                3
            ]
        },
        {
            "id": 3,
            "callFrame": {
                "functionName": "runMicrotasks",
                "scriptId": "0",
                "url": "",
                "lineNumber": -1,
                "columnNumber": -1
            },
            "hitCount": 0,
            "children": [
                4
            ]
        },
        {
            "id": 4,
            "callFrame": {
                "functionName": "iterEnvs",
                "scriptId": "463",
                "url": "file:///Users/mikewilliamson/.vscode/extensions/ms-python.python-2021.3.680753044/out/client/extension.js",
                "lineNumber": 8,
                "columnNumber": 362633
            },
            "hitCount": 0,
            "children": [
                5
            ]
        },
        {
            "id": 5,
            "callFrame": {
                "functionName": "doIterEnvs",
                "scriptId": "463",
                "url": "file:///Users/mikewilliamson/.vscode/extensions/ms-python.python-2021.3.680753044/out/client/extension.js",
                "lineNumber": 60,
                "columnNumber": 757453
            },
            "hitCount": 0,
            "children": [
                6
            ]
        },
        {
            "id": 6,
            "callFrame": {
                "functionName": "iterFromCache",
                "scriptId": "463",
                "url": "file:///Users/mikewilliamson/.vscode/extensions/ms-python.python-2021.3.680753044/out/client/extension.js",
                "lineNumber": 60,
                "columnNumber": 758456
            },
            "hitCount": 0,
            "children": [
                7
            ]
        },
        {
            "id": 7,
            "callFrame": {
                "functionName": "t.getQueryFilter",
                "scriptId": "463",
                "url": "file:///Users/mikewilliamson/.vscode/extensions/ms-python.python-2021.3.680753044/out/client/extension.js",
                "lineNumber": 8,
                "columnNumber": 241000
            },
            "hitCount": 0,
            "children": [
                8
            ]
        },
        {
            "id": 8,
            "callFrame": {
                "functionName": "",
                "scriptId": "463",
                "url": "file:///Users/mikewilliamson/.vscode/extensions/ms-python.python-2021.3.680753044/out/client/extension.js",
                "lineNumber": 8,
                "columnNumber": 241199
            },
            "hitCount": 0,
            "children": [
                9
            ]
        },
        {
            "id": 9,
            "callFrame": {
                "functionName": "",
                "scriptId": "463",
                "url": "file:///Users/mikewilliamson/.vscode/extensions/ms-python.python-2021.3.680753044/out/client/extension.js",
                "lineNumber": 8,
                "columnNumber": 241322
            },
            "hitCount": 37875,
            "positionTicks": [
                {
                    "line": 9,
                    "ticks": 37875
                }
            ]
        }
    ],
    "startTime": 21959870208,
    "endTime": 21965152805,
    "samples": [
        9,
        9,
        9,

. . .

        144,
        134,
        76
    ]
}

(The file is 75_890 lines long; all the missing lines just have some arbitrary sample number.)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
Alexey-Kamenevcommented, Apr 19, 2021

I’m also having all sorts of issues with Jupyter extension, from being too slow to issues with keyboard navigation, diffs not working and so on. The only way to disable Jupyter extension that I’ve found so far is to install Python extension version just before Jupyter functionality was refactored into a separate extension. Click “Install Another Version…” in Python extension and choose 2020.10.332292344 version. After installation, you should be able to uninstall Jupyter extension just fine. It’s also a good idea to disable Jupyter in settings, something like:

    "python.dataScience.disableJupyterAutoStart": true,
    "python.dataScience.useNotebookEditor": false

This worked well for me even at the cost of not having the latest version of Python extension.

It would be great if Python/Jupyter extensions authors consider reversing the dependency so the Python extension won’t depend on the Jupyter one anymore.

1reaction
rchiodocommented, Jun 14, 2021

It’s actually circular the moment. The jupyter extension depends upon the python extension when starting python based kernels. The python extension depends upon the jupyter extension for some of it’s data viewing features.

We’re unlikely to change this dependency because it’s not really worth the effort (making a 3rd npm module or extension for the dataviewing part). The python extension is however in the process of removing the hard dependency. It should become optional in the near future.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to remove the Jupyter extension without losing ...
Navigate to "$Users\yourUsername\. · Delete the folder that contains the Jupyter extension · Then open the folder containing the Python extension ...
Read more >
Cannot uninstall Jupyter extension, Python ...
Environment data VS Code version: 1.55.2 Extension version (available under ... Cannot uninstall Jupyter extension, Python extension depends on this #15977.
Read more >
How can i remove Jupyter extension : r/vscode
'Python' extension depends on it. So, I found a workaround on solving this problem: Click "Install Another Version..." in Python extension and ...
Read more >
How do we uninstall extensions that have been installed ...
I worked through the tutorial again. I am not able to uninstall it. It states that it has been uninstalled, but it's still...
Read more >
Java extensions for Visual Studio Code
Tip: To learn how to install and manage your extensions, ... This extension pack contains a list of popular Java extensions for fundamental...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found