Issue
My computer system is MacOS Sonoma 14.1.1. When I start jupyter notebook from the command or Anaconda, the following error appears. How to solve it? Thanks.
/Users/mac/anaconda3/bin/jupyter_mac.command ; exit;
The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.
(base) MacBook-Pro-2:~ mac$ /Users/mac/anaconda3/bin/jupyter_mac.command ; exit;
Traceback (most recent call last):
File "/Users/mac/anaconda3/lib/python3.11/site-packages/notebook/services/sessions/sessionmanager.py", line 9, in <module>
import sqlite3
File "/Users/mac/anaconda3/lib/python3.11/sqlite3/__init__.py", line 57, in <module>
from sqlite3.dbapi2 import *
File "/Users/mac/anaconda3/lib/python3.11/sqlite3/dbapi2.py", line 27, in <module>
from _sqlite3 import *
ImportError: dlopen(/Users/mac/anaconda3/lib/python3.11/lib-dynload/_sqlite3.cpython-311-darwin.so, 0x0002): Symbol not found: _sqlite3_enable_load_extension
Referenced from: <55C163F0-89FA-3BFF-8FCB-DFF6F31B1972> /Users/mac/anaconda3/lib/python3.11/lib-dynload/_sqlite3.cpython-311-darwin.so
Expected in: <567CDD63-191D-36E4-959B-7DE47C7AFD7A> /usr/lib/libsqlite3.dylib
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/mac/anaconda3/bin/jupyter-notebook", line 7, in <module>
from notebook.notebookapp import main
File "/Users/mac/anaconda3/lib/python3.11/site-packages/notebook/notebookapp.py", line 83, in <module>
from .services.sessions.sessionmanager import SessionManager
File "/Users/mac/anaconda3/lib/python3.11/site-packages/notebook/services/sessions/sessionmanager.py", line 12, in <module>
from pysqlite2 import dbapi2 as sqlite3
ModuleNotFoundError: No module named 'pysqlite2'
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
Solution
looks like this problem. github.com/jupyterhub/jupyterhub/issues/1594
see https://github.com/jupyterhub/jupyterhub/issues/1594#issuecomment-354775138
what is DYLD_LIBRARY_PATH set to?
"DYLD_LIBRARY_PATH should approximately never be set, and if set, only to non-default paths, such as ~/work/mystuff/lib, and only for temporary working environments (e.g. never in ~/.bashrc). The cause is that you have told the system that any library found in /usr/lib should be loaded (in this case sqlite) in preference to other locations, e.g. ...conda/lib/, which is where the sqlite that Python requires is located."
Answered By - seanv507
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.