Ubuntu安装jupyter,启动出现ModuleNotFoundError: No module named ‘pysqlite2‘ 错误
2021/11/11 2:09:53
本文主要是介绍Ubuntu安装jupyter,启动出现ModuleNotFoundError: No module named ‘pysqlite2‘ 错误,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
Ubuntu安装jupyter,启动出现ModuleNotFoundError: No module named 'pysqlite2' 错误
- 错误描述
- 错误定位
- 解决错误
- 后记
错误描述
Ubuntu安装jupyter,过程中并未出现错误,而在启动jupyter时出现错误:
Traceback (most recent call last): File "/home/brainiac/Program/python3.7/lib/python3.7/site-packages/notebook/services/sessions/sessionmanager.py", line 9, in <module> import sqlite3 File "/home/brainiac/Program/python3.7/lib/python3.7/sqlite3/__init__.py", line 23, in <module> from sqlite3.dbapi2 import * File "/home/brainiac/Program/python3.7/lib/python3.7/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/brainiac/Program/python3.7/bin/jupyter-notebook", line 5, in <module> from notebook.notebookapp import main File "/home/brainiac/Program/python3.7/lib/python3.7/site-packages/notebook/notebookapp.py", line 88, in <module> from .services.sessions.sessionmanager import SessionManager File "/home/brainiac/Program/python3.7/lib/python3.7/site-packages/notebook/services/sessions/sessionmanager.py", line 12, in <module> from pysqlite2 import dbapi2 as sqlite3 ModuleNotFoundError: No module named 'pysqlite2'
错误定位
构建Python3时缺少libsqlite3-dev
依赖。
因此需要安装libsqlite3-dev后,重新编译python即可解决。
解决错误
安装libsqlite3-dev
sudo apt-get install libsqlite3-dev
安装完成后,重新编译安装即可,编译过程可以参考此博文。
重新运行jupyter,运行成功
jupyter notebook
后记
Enjoy coding.
这篇关于Ubuntu安装jupyter,启动出现ModuleNotFoundError: No module named ‘pysqlite2‘ 错误的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2023-12-29"SQLite注入获取表名技巧"
- 2023-12-27SQLite数据库注入方式及安全性
- 2022-09-16Sqlite 并发读写的演进之路
- 2022-09-07修改ASQLite3D2010 支持中文显示
- 2022-09-0502-mORMot框架样例学习-02 - Embedded SQLite3 ORM(SQLite3 数据库)
- 2022-08-22基础复习——数据库SQLite——SQL的基本语法——数据库管理器SQLiteDatabase——数据库帮助器SQLiteOpenHelper
- 2022-08-21【数据库】SQLite数据库 工具
- 2022-08-06SQLite 错误:database disk image is malformed - 数据库磁盘映像格式不正确
- 2022-07-30学生信息管理系统(QT+SQLITE实现)
- 2022-07-22SQLite 建表、增删改查 简单操作