gpt4 book ai didi

linux - Jupyter 缺少 _sqlite3 和 pysqlite2

转载 作者:太空宇宙 更新时间:2023-11-04 09:17:30 38 4
gpt4 key购买 nike

试图让 jupyter (ipython3) 在 Python3.5 上运行,我安装它使用

sudo pip3 install jupyter

但是,当尝试启动 jupyter notebook 时,我收到错误消息,指出缺少模块 _sqlite3 和 pysqlite2。我尝试通过 pip3 安装它们。对于 pysqlite2,似乎没有版本可用(?)。对于 sqlite3,我得到

RuntimeError: Package 'sqlite3' must not be downloaded from pypi

Traceback (most recent call last):   File "/usr/local/lib/python3.5/site-packages/notebook/services/sessions/sessionmanager.py", line 10, in <module>
import sqlite3 File "/usr/local/lib/python3.5/sqlite3/__init__.py", line 23, in <module>
from sqlite3.dbapi2 import * File "/usr/local/lib/python3.5/sqlite3/dbapi2.py", line 27, in <module>
from _sqlite3 import * ImportError: No module named '_sqlite3'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/jupyter-notebook", line 7, in <module>
from notebook.notebookapp import main
File "/usr/local/lib/python3.5/site-packages/notebook/notebookapp.py", line 79, in <module>
from .services.sessions.sessionmanager import SessionManager
File "/usr/local/lib/python3.5/site-packages/notebook/services/sessions/sessionmanager.py", line 13, in <module>
from pysqlite2 import dbapi2 as sqlite3
ImportError: No module named 'pysqlite2'

有什么想法吗?

最佳答案

我在构建 Python3 时缺少 libsqlite3-dev。因此,在运行 sudo apt-get install libsqlite3-dev 并重建 Python3 之后,现在一切似乎都正常了。

关于linux - Jupyter 缺少 _sqlite3 和 pysqlite2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45565290/

38 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com