Python3版
Python 3.5.2
点子列表
jupyter (1.0.0)
jupyter-client (5.2.3)
jupyter-console (5.2.0)
jupyter-core (4.4.0)
运行jupyter笔记本
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'
在处理上述异常期间,发生了另一个异常:
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 83, 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'
尝试了sudo apt-get install libsqlite3-dev
如何解决上述错误?
答案 0 :(得分:0)
要解决_sqlite3
的导入错误,我执行了以下操作:
libsqlite3-dev
Python 2.7.15
。此后,python -c 'import _sqlite3'
在/usr/local/bin/python
中使用备用安装成功。我相信您可以像这样从源代码安装Python3并使用它。