How to uninstall jupyter

后端 未结 9 688
独厮守ぢ
独厮守ぢ 2020-11-30 20:53

I have been trying to uninstall jupyter

I have tried the following commands

pip uninstall jupyter
pip3 uninstall jupyter

and

相关标签:
9条回答
  • 2020-11-30 21:08

    If you don't want to use pip-autoremove (since it removes dependencies shared among other packages) and pip3 uninstall jupyter just removed some packages, then do the following:

    Copy-Paste:

    sudo may be needed as per your need.

    python3 -m pip uninstall -y jupyter jupyter_core jupyter-client jupyter-console jupyterlab_pygments notebook qtconsole nbconvert nbformat
    

    Note:

    The above command will only uninstall jupyter specific packages. I have not added other packages to uninstall since they might be shared among other packages (eg: Jinja2 is used by Flask, ipython is a separate set of packages themselves, tornado again might be used by others).

    In any case, all the dependencies are mentioned below(as of 21 Nov, 2020. jupyter==4.4.0 )

    If you are sure you want to remove all the dependencies, then you can use Stan_MD's answer.

    attrs
    backcall
    bleach
    decorator
    defusedxml
    entrypoints
    importlib-metadata
    ipykernel
    ipython
    ipython-genutils
    ipywidgets
    jedi
    Jinja2
    jsonschema
    jupyter
    jupyter-client
    jupyter-console
    jupyter-core
    jupyterlab-pygments
    MarkupSafe
    mistune
    more-itertools
    nbconvert
    nbformat
    notebook
    pandocfilters
    parso
    pexpect
    pickleshare
    prometheus-client
    prompt-toolkit
    ptyprocess
    Pygments
    pyrsistent
    python-dateutil
    pyzmq
    qtconsole
    Send2Trash
    six
    terminado
    testpath
    tornado
    traitlets
    wcwidth
    webencodings
    widgetsnbextension
    zipp
    

    Executive Edit:

    pip3 uninstall jupyter
    pip3 uninstall jupyter_core
    pip3 uninstall jupyter-client
    pip3 uninstall jupyter-console
    pip3 uninstall jupyterlab_pygments
    pip3 uninstall notebook
    pip3 uninstall qtconsole
    pip3 uninstall nbconvert
    pip3 uninstall nbformat
    

    Explanation of each:

    1. Uninstall jupyter dist-packages:

      pip3 uninstall jupyter

    2. Uninstall jupyter_core dist-packages (It also uninstalls following binaries: jupyter, jupyter-migrate,jupyter-troubleshoot):

      pip3 uninstall jupyter_core

    3. Uninstall jupyter-client:

      pip3 uninstall jupyter-client

    4. Uninstall jupyter-console:

      pip3 uninstall jupyter-console

    5. Uninstall jupyter-notebook (It also uninstalls following binaries: jupyter-bundlerextension, jupyter-nbextension, jupyter-notebook, jupyter-serverextension):

      pip3 uninstall notebook

    6. Uninstall jupyter-qtconsole :

      pip3 uninstall qtconsole

    7. Uninstall jupyter-nbconvert:

      pip3 uninstall nbconvert

    8. Uninstall jupyter-trust:

      pip3 uninstall nbformat

    0 讨论(0)
  • 2020-11-30 21:11

    When you $ pip install jupyter several dependencies are installed. The best way to uninstall it completely is by running:

    1. $ pip install pip-autoremove
    2. $ pip-autoremove jupyter -y

    Kindly refer to this related question.

    pip-autoremove removes a package and its unused dependencies. Here are the docs.

    0 讨论(0)
  • 2020-11-30 21:12

    In pip3

    pip3 uninstall jupyterlab

    0 讨论(0)
  • 2020-11-30 21:14

    In my case, I have installed it via pip3 on mac.

    pip3 uninstall notebook
    
    0 讨论(0)
  • 2020-11-30 21:20

    Try pip uninstall jupyter_core. Details below:

    I ran into a similar issue when my jupyter notebook only showed Python 2 notebook. (no Python 3 notebook)

    I tried to uninstall jupyter by pip unistall jupyter, pi3 uninstall jupyter, and the suggested pip-autoremove jupyter -y.

    Nothing worked. I ran which jupyter, and got /home/ankit/.local/bin/jupyter

    The file /home/ankit/.local/bin/jupyter was just a simple python code:

    #!/usr/bin/python3
    
    # -*- coding: utf-8 -*-
    import re
    import sys
    
    from jupyter_core.command import main
    
    if __name__ == '__main__':
        sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
        sys.exit(main())
    

    Tried to uninstall the module jupyter_core by pip uninstall jupyter_core and it worked.

    Reinstalled jupyter with pip3 install jupyter and everything was back to normal.

    0 讨论(0)
  • 2020-11-30 21:22

    If you installed Jupiter notebook through anaconda, this may help you:

    conda uninstall jupyter notebook
    
    0 讨论(0)
提交回复
热议问题