[英]Trying to run a jupyter notebook on a Linux server
I am trying to run jupyter notebook
on a server I have access to but it keeps throwing out this error:我正在尝试在我有权访问的服务器上运行jupyter notebook
,但它不断抛出此错误:
I have tried using pip3 install --user sqlite3
and pip install --user pysqlite2
plus a bunch of other combinations which keeps leading me down a rabbit hole of errors.我曾尝试使用pip3 install --user sqlite3
和pip install --user pysqlite2
加上一堆其他组合,这些组合一直让我pip3 install --user sqlite3
。
Any help would be great.任何帮助都会很棒。
-bash-4.2$ jupyter notebook
Traceback (most recent call last):
File "/data/users/USER/.local/lib/python3.7/site-packages/notebook/services/sessions/sessionmanager.py", line 10, in <module>
import sqlite3
File "/usr/local/lib/python3.7/sqlite3/__init__.py", line 23, in <module>
from sqlite3.dbapi2 import *
File "/usr/local/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 "/data/users/USER/.local/bin/jupyter-notebook", line 6, in <module>
from notebook.notebookapp import main
File "/data/users/USER/.local/lib/python3.7/site-packages/notebook/notebookapp.py", line 86, in <module>
from .services.sessions.sessionmanager import SessionManager
File "/data/users/USER/.local/lib/python3.7/site-packages/notebook/services/sessions/sessionmanager.py", line 13, in <module>
from pysqlite2 import dbapi2 as sqlite3
ModuleNotFoundError: No module named 'pysqlite2'
Output1:输出 1:
-bash-4.2$ hostnamectl
Static hostname: SERVER_NAME
Icon name: computer-server
Chassis: server
Machine ID: 807cc73fa4ba404192edd7c64de3cf3f
Boot ID: 279d14738e2548d2b0622b399a9dfd40
Operating System: Red Hat Enterprise Linux
CPE OS Name: cpe:/o:redhat:enterprise_linux:7.6:GA:server
Kernel: Linux 3.10.0-957.10.1.el7.x86_64
Architecture: x86-64
Output2输出 2
-bash-4.2$ yum install sqlite-devel
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
Repo rhel-7-server-rpms forced skip_if_unavailable=True due to: /etc/pki/entitlement/766154663321574841286633-key.pem
You need to be root to perform this command.
So seems like you have multiple Python installations.所以看起来你有多个 Python 安装。
Do the following steps:执行以下步骤:
python3.6 -m venv env
source env/bin/activate
python -m pip install --upgrade pip
python -m pip install jupyter
jupyter notebook
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.