标签: jupyter-kernel

Jupyter Notebook 中的内核是什么?它与实际内核(与操作系统相关)有何不同/相似之处?

我在使用 Jupyter Notebook 时听到并看到了很多“内核”这个词。我只想知道“内核”在 Jupyter Notebook 中代表什么。它与我们在操作系统中使用的含义相同吗?如果它相似/不同,究竟如何?

两个内核都进行硬件交互吗?

内核(操作系统):https ://simple.m.wikipedia.org/wiki/Kernel_( computer_science)

内核(Jupyter Notebook) https://jupyter-client.readthedocs.io/en/stable/kernels.html

kernel jupyter-notebook jupyter-kernel

15
推荐指数
1
解决办法
7922
查看次数

jupyter 笔记本中的 lfortran 会杀死内核

我似乎无法从lfortran jupyter kernel获得输出。

我通过 conda install 安装了:

  - lfortran
  - jupyter
Run Code Online (Sandbox Code Playgroud)

我可以运行jupyter并选择 lfortran 内核。然而:

Hello World 不执行任何操作

我没有看到 hello world,也没有看到错误。

如果在第二个单元格中我调用new它会使内核崩溃。

fortran jupyter-notebook jupyter-kernel

9
推荐指数
1
解决办法
656
查看次数

Jupyter 内核使用与 Conda 环境不同的 Python 版本

我无法将 Jupyter 内核链接到其父 Conda 环境。创建链接到 Conda 环境的新内核后,我在 Jupyter 实验室中获得了不同版本的 Python 及其依赖项。

\n\n

以下是我遵循的步骤:

\n\n

使用以下命令创建 conda 环境:

\n\n

conda create -n nlp python=3.6

\n\n

conda activate nlp

\n\n

(nlp) \xe2\x9e\x9c ~ python --version

\n\n
\n

Python 3.6.9 :: Anaconda, Inc.

\n
\n\n

(nlp) \xe2\x9e\x9c ~ which python

\n\n
\n

/anaconda3/envs/nlp/bin/python

\n
\n\n

在环境中我创建了一个 Jupyter 内核:

\n\n

(nlp) \xe2\x9e\x9c ~ python -m ipykernel install --user --name=nlp

\n\n
\n

在 /Users//Library/Jupyter/kernels/nlp 中安装 kernelspec nlp

\n
\n\n

研究为内核创建的 json 文件:

\n\n
(nlp) \xe2\x9e\x9c …
Run Code Online (Sandbox Code Playgroud)

anaconda conda jupyter-notebook jupyter-lab jupyter-kernel

7
推荐指数
1
解决办法
3449
查看次数

通过pip安装的spyder-kernels模块的ModuleNotFoundError

我正在尝试使用conda来安装spyder-kernels并根据以下说明在远程服务器上实例化内核:https://docs.spyder-ide.org/ipythonconsole.html

当我运行命令时,python -m spyder_kernels.console我收到一个错误:

/home/selah/anaconda3/bin/python: Error while finding module specification for 'spyder-kernels.console' (ModuleNotFoundError: No module named 'spyder-kernels')
Run Code Online (Sandbox Code Playgroud)

但是,我知道今天早些时候这个命令工作正常.

关于发生了什么以及如何解决它的任何想法?

版本信息:

[selah@lothal ~]$ conda --version
conda 4.6.2
[selah@lothal ~]$ conda list | grep spyder-kernels
spyder-kernels            0.3.0                    py36_0  
[selah@lothal ~]$ find -name '*spyder-kernels*'
./anaconda3/pkgs/spyder-kernels-0.3.0-py36_0
./anaconda3/pkgs/spyder-kernels-0.3.0-py36_0.tar.bz2
./anaconda3/conda-meta/spyder-kernels-0.3.0-py36_0.json
Run Code Online (Sandbox Code Playgroud)

python spyder jupyter-kernel

5
推荐指数
1
解决办法
852
查看次数

Jupyter 笔记本内核在一段时间后断开连接/死机,无法重新连接到亚马逊 EC2 实例并完成(当前正在运行)操作。

  1. 当我通过 Mobaxterm 连接到 EC2 实例时,一段时间后我的 jupyter notebook 内核失去连接。
  2. 并且一些非常耗时的操作/(当前正在运行的任务)需要一次又一次地重新执行并且永无止境(这一次又一次地重复)。
  3. 我正在关闭笔记本并重新启动,因此我可以获得与内核的连接,因为它不会重新连接,并且当它最终死机时我不得不一次又一次地执行该过程。
  4. 它还显示 SSL 错误,有时会在断开连接之前显示错误的版本号。

winscp amazon-ec2 amazon-web-services jupyter-notebook jupyter-kernel

5
推荐指数
1
解决办法
1258
查看次数

kube 服务域名不起作用,但 clusterIP 可以与 Jupyter Enterprise Gateway 配合使用

jupyter我在kubernetes 集群的命名空间中设置了 Jupyter 笔记本,并enterprise-gateway在同一集群中的命名空间中设置了 Jupyter Enterprise Gateway 作为服务。

如果我将笔记本配置为enterprise-gateway使用 clusterIP 连接到服务,则它可以正常工作。

--gateway-url=http://172.20.186.249:8888
Run Code Online (Sandbox Code Playgroud)

但如果我切换到使用服务域名,笔记本电脑会收到 503 Connection Refused 错误

--gateway-url=http://enterprise-gateway.enterprise-gateway.svc.cluster.local:8888
Run Code Online (Sandbox Code Playgroud)

当我使用 busybox check 检查 kubernetes dns 时,域按预期解析。

kubectl -n default exec -ti busybox nslookup enterprise-gateway.enterprise-gateway
kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.
Server:    172.20.0.10
Address 1: 172.20.0.10 kube-dns.kube-system.svc.cluster.local

Name:      enterprise-gateway.enterprise-gateway
Address 1: 172.20.186.249 enterprise-gateway.enterprise-gateway.svc.cluster.local
Run Code Online (Sandbox Code Playgroud)

如何让域名发挥作用?

JEG 的服务配置如下所示......

kubectl describe svc enterprise-gateway --namespace enterprise-gateway …
Run Code Online (Sandbox Code Playgroud)

kubernetes jupyter jupyter-notebook jupyter-kernel

5
推荐指数
1
解决办法
740
查看次数