I’m trying to install Jupyterhub for my users on a Rocky9 Linux system. Most of the installation went fine. There were no errors for the following commands:
useradd -m -c 'Runs the JupyterHub server' jupyterhub
passwd -l jupyterhub
su - jupyterhub
python3.12 -m venv jupyterhub-env
source jupyterhub-env/bin/activate
pip install jupyterhub notebook configurable-http-proxy
Then, generate a configuration file, which is ~/jupyterhub_config.py
jupyterhub --generate-config
I only changed the port number in the config file.
Finally, I started the server:
jupyterhub
[I 2024-08-21 15:55:29.320 JupyterHub app:3307] Running JupyterHub version 5.1.0
[I 2024-08-21 15:55:29.320 JupyterHub app:3337] Using Authenticator: jupyterhub.auth.PAMAuthenticator-5.1.0
[I 2024-08-21 15:55:29.320 JupyterHub app:3337] Using Spawner: jupyterhub.spawner.LocalProcessSpawner-5.1.0
[I 2024-08-21 15:55:29.320 JupyterHub app:3337] Using Proxy: jupyterhub.proxy.ConfigurableHTTPProxy-5.1.0
[I 2024-08-21 15:55:29.326 JupyterHub app:1837] Loading cookie_secret from /home/jupyterhub/jupyterhub_cookie_secret
[E 2024-08-21 15:55:29.342 JupyterHub app:3873]
Traceback (most recent call last):
File "/home/jupyterhub/jupyterhub-env/lib/python3.12/site-packages/jupyterhub/app.py", line 3870, in launch_instance_async
await self.initialize(argv)
File "/home/jupyterhub/jupyterhub-env/lib/python3.12/site-packages/jupyterhub/app.py", line 3349, in initialize
self.init_db()
File "/home/jupyterhub/jupyterhub-env/lib/python3.12/site-packages/jupyterhub/app.py", line 2009, in init_db
self.session_factory = orm.new_session_factory(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jupyterhub/jupyterhub-env/lib/python3.12/site-packages/jupyterhub/orm.py", line 1564, in new_session_factory
engine = create_engine(url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<string>", line 2, in create_engine
File "/home/jupyterhub/jupyterhub-env/lib/python3.12/site-packages/sqlalchemy/util/deprecations.py", line 281, in warned
return fn(*args, **kwargs) # type: ignore[no-any-return]
^^^^^^^^^^^^^^^^^^^
File "/home/jupyterhub/jupyterhub-env/lib/python3.12/site-packages/sqlalchemy/engine/create.py", line 599, in create_engine
dbapi = dbapi_meth(**dbapi_args)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jupyterhub/jupyterhub-env/lib/python3.12/site-packages/sqlalchemy/dialects/sqlite/pysqlite.py", line 508, in import_dbapi
from sqlite3 import dbapi2 as sqlite
File "/usr/local/lib/python3.12/sqlite3/__init__.py", line 57, in <module>
from sqlite3.dbapi2 import *
File "/usr/local/lib/python3.12/sqlite3/dbapi2.py", line 27, in <module>
from _sqlite3 import *
ModuleNotFoundError: No module named '_sqlite3'
I googled for solutions, but came up empty, so I hope someone here can help.
Thanks in advance!
Scott Anderson