美文网首页
ubuntu安装jupyter Notebook

ubuntu安装jupyter Notebook

作者: expgene | 来源:发表于2023-11-27 11:34 被阅读0次

    ubuntu安装:

    sudo pip install jupyter

    报错:

    Attempting uninstall: importlib-metadata

        Found existing installation: importlib-metadata 1.5.0

        Not uninstalling importlib-metadata at /usr/lib/python3/dist-packages, outside environment /usr

        Can't uninstall 'importlib-metadata'. No files were found to uninstall.

      Attempting uninstall: attrs

        Found existing installation: attrs 19.3.0

        Not uninstalling attrs at /usr/lib/python3/dist-packages, outside environment /usr

        Can't uninstall 'attrs'. No files were found to uninstall.

      Attempting uninstall: jsonschema

        Found existing installation: jsonschema 3.2.0

        Not uninstalling jsonschema at /usr/lib/python3/dist-packages, outside environment /usr

        Can't uninstall 'jsonschema'. No files were found to uninstall.

      Attempting uninstall: markupsafe

        Found existing installation: MarkupSafe 1.1.0

        Not uninstalling markupsafe at /usr/lib/python3/dist-packages, outside environment /usr

        Can't uninstall 'MarkupSafe'. No files were found to uninstall.

      Attempting uninstall: jinja2

        Found existing installation: Jinja2 2.10.1

        Not uninstalling jinja2 at /usr/lib/python3/dist-packages, outside environment /usr

        Can't uninstall 'Jinja2'. No files were found to uninstall.

    Successfully installed anyio-4.1.0 argon2-cffi-23.1.0 argon2-cffi-bindings-21.2.0 asttokens-2.4.1 async-lru-2.0.4 attrs-23.1.0 babel-2.13.1 backcall-0.2.0 beautifulsoup4-4.12.2 bleach-6.1.0 cffi-1.16.0 comm-0.2.0 debugpy-1.8.0 decorator-5.1.1 defusedxml-0.7.1 exceptiongroup-1.2.0 executing-2.0.1 fastjsonschema-2.19.0 importlib-metadata-6.8.0 ipykernel-6.27.1 ipython-8.12.3 ipywidgets-8.1.1 jedi-0.19.1 jinja2-3.1.2 json5-0.9.14 jsonschema-4.20.0 jsonschema-specifications-2023.11.1 jupyter-1.0.0 jupyter-client-8.6.0 jupyter-console-6.6.3 jupyter-core-5.5.0 jupyter-events-0.9.0 jupyter-lsp-2.2.1 jupyter-server-2.11.1 jupyter-server-terminals-0.4.4 jupyterlab-4.0.9 jupyterlab-pygments-0.3.0 jupyterlab-server-2.25.2 jupyterlab-widgets-3.0.9 markupsafe-2.1.3 matplotlib-inline-0.1.6 mistune-3.0.2 nbclient-0.9.0 nbconvert-7.11.0 nbformat-5.9.2 nest-asyncio-1.5.8 notebook-7.0.6 notebook-shim-0.2.3 overrides-7.4.0 pandocfilters-1.5.0 parso-0.8.3 pickleshare-0.7.5 pkgutil-resolve-name-1.3.10 platformdirs-4.0.0 prometheus-client-0.19.0 prompt-toolkit-3.0.41 psutil-5.9.6 ptyprocess-0.7.0 pure-eval-0.2.2 pycparser-2.21 pygments-2.17.2 python-json-logger-2.0.7 pyzmq-25.1.1 qtconsole-5.5.1 qtpy-2.4.1 referencing-0.31.0 rfc3339-validator-0.1.4 rfc3986-validator-0.1.1 rpds-py-0.13.1 send2trash-1.8.2 sniffio-1.3.0 soupsieve-2.5 stack-data-0.6.3 terminado-0.18.0 tinycss2-1.2.1 toml

    最后jupyter notebook执行后就能运行

    centos7安装:

    pip3 install jupyter

    遇见错误:

    Traceback (most recent call last):

      File "/home/xxx/software/python3101/lib/python3.10/site-packages/jupyter_server/services/sessions/sessionmanager.py", line 14, in <module>

        import sqlite3

      File "/home/xxx/software/python3101/lib/python3.10/sqlite3/__init__.py", line 57, in <module>

        from sqlite3.dbapi2 import *

      File "/home/xxx/software/python3101/lib/python3.10/sqlite3/dbapi2.py", line 27, in <module>

        from _sqlite3 import *

    ModuleNotFoundError: No module named '_sqlite3'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):

      File "/home/xxx/software/python3101/bin/jupyter-notebook", line 5, in <module>

        from notebook.app import main

      File "/home/xxx/software/python3101/lib/python3.10/site-packages/notebook/app.py", line 17, in <module>

        from jupyter_server.serverapp import flags

      File "/home/xxx/software/python3101/lib/python3.10/site-packages/jupyter_server/serverapp.py", line 97, in <module>

        from jupyter_server.gateway.managers import (

      File "/home/xxx/software/python3101/lib/python3.10/site-packages/jupyter_server/gateway/managers.py", line 32, in <module>

        from ..services.sessions.sessionmanager import SessionManager

      File "/home/xxxj/software/python3101/lib/python3.10/site-packages/jupyter_server/services/sessions/sessionmanager.py", line 17, in <module>

        from pysqlite2 import dbapi2 as sqlite3  # type:ignore[no-redef]

    ModuleNotFoundError: No module named 'pysqlite2'

    相关文章

      网友评论

          本文标题:ubuntu安装jupyter Notebook

          本文链接:https://www.haomeiwen.com/subject/oyvzwdtx.html