Reputation: 929
Installing jupyter notebook from jupyter
Python3 version
Python 3.5.2
pip list
jupyter (1.0.0)
jupyter-client (5.2.3)
jupyter-console (5.2.0)
jupyter-core (4.4.0)
Running jupyter notebook
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 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'
Also tried sudo apt-get install libsqlite3-dev from No module named _sqlite3
How to resolve the above error?
Upvotes: 0
Views: 3307
Reputation: 5720
To fix the import error for _sqlite3
I did the following:
libsqlite3-dev
on my Ubuntu 18.04Python 2.7.15
following https://tecadmin.net/install-python-2-7-on-ubuntu-and-linuxmint.After this python -c 'import _sqlite3'
succeeded when I used the alternate installation in /usr/local/bin/python
. I believe you can install Python3 from the source like this and use it.
Upvotes: 1