Kernel error: jupyter_client/connect.py AssertionError
Kernel error: jupyter_client/connect.py AssertionError
错误信息
Traceback (most recent call last):
File "/home/djan/anaconda3/lib/python3.7/site-packages/tornado/web.py", line 1699, in _execute
result = await result
File "/home/djan/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "/home/djan/anaconda3/lib/python3.7/site-packages/notebook/services/sessions/handlers.py", line 72, in post
type=mtype))
File "/home/djan/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 735, in run
value = future.result()
File "/home/djan/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "/home/djan/anaconda3/lib/python3.7/site-packages/notebook/services/sessions/sessionmanager.py", line 88, in create_session
kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
File "/home/djan/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 735, in run
value = future.result()
File "/home/djan/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "/home/djan/anaconda3/lib/python3.7/site-packages/notebook/services/sessions/sessionmanager.py", line 101, in start_kernel_for_session
self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
File "/home/djan/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 735, in run
value = future.result()
File "/home/djan/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 209, in wrapper
yielded = next(result)
File "/home/djan/anaconda3/lib/python3.7/site-packages/notebook/services/kernels/kernelmanager.py", line 168, in start_kernel
super(MappingKernelManager, self).start_kernel(**kwargs)
File "/home/djan/anaconda3/lib/python3.7/site-packages/jupyter_client/multikernelmanager.py", line 110, in start_kernel
km.start_kernel(**kwargs)
File "/home/djan/anaconda3/lib/python3.7/site-packages/jupyter_client/manager.py", line 240, in start_kernel
self.write_connection_file()
File "/home/djan/anaconda3/lib/python3.7/site-packages/jupyter_client/connect.py", line 547, in write_connection_file
kernel_name=self.kernel_name
File "/home/djan/anaconda3/lib/python3.7/site-packages/jupyter_client/connect.py", line 212, in write_connection_file
with secure_write(fname) as f:
File "/home/djan/anaconda3/lib/python3.7/contextlib.py", line 112, in __enter__
return next(self.gen)
File "/home/djan/anaconda3/lib/python3.7/site-packages/jupyter_client/connect.py", line 105, in secure_write
assert '0600' == oct(stat.S_IMODE(os.stat(fname).st_mode)).replace('0o', '0')
AssertionError
系统信息
运行在 Linux 服务器上安装 Jupyter (v. 1.0.0),使用 anaconda3 (v. 2019.07) 64 位。
可用内核
可用内核:
python3 /home/djan/.local/share/jupyter/kernels/python3
nn /home/djan/.local/share/jupyter/kernels/nn
重现问题
- 安装最新的 anaconda3 版本。
- 运行 基本版本的 Jupyter notebook --> 内核运行良好
- 使用 python 创建新环境:
conda create -n test python=3.7
- 激活环境后,Jupyter notebook 不可用,必须通过Conda安装:
conda install -c anaconda jupyter
- 运行 测试环境中的 Jupyter notebook --> 内核如上文所述发生故障
到目前为止我尝试了什么
在 Conda 环境中的服务器上 运行 Jupyter 时,文件权限似乎存在问题。我试图为我的 anaconda3 文件夹中的所有文件提供请求的权限 (0600),但这没有帮助。
更新
事实证明,最新版本的 jupyter_client
(在 anaconda 下可用,版本为 5.3.3)破坏了服务器上的 Jupyter 环境。
通过以下命令安装以前版本的 jupyter_client 修复了此问题:
conda install -c anaconda jupyter_client=5.3.1
不错
更新
事实证明,最新版本的 jupyter_client(在 anaconda 下可用,版本为 5.3.3)破坏了服务器上的 Jupyter 环境。
通过以下命令安装以前版本的 jupyter_client 修复了此问题:
conda install -c anaconda jupyter_client=5.3.1
错误信息
Traceback (most recent call last):
File "/home/djan/anaconda3/lib/python3.7/site-packages/tornado/web.py", line 1699, in _execute
result = await result
File "/home/djan/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "/home/djan/anaconda3/lib/python3.7/site-packages/notebook/services/sessions/handlers.py", line 72, in post
type=mtype))
File "/home/djan/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 735, in run
value = future.result()
File "/home/djan/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "/home/djan/anaconda3/lib/python3.7/site-packages/notebook/services/sessions/sessionmanager.py", line 88, in create_session
kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
File "/home/djan/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 735, in run
value = future.result()
File "/home/djan/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "/home/djan/anaconda3/lib/python3.7/site-packages/notebook/services/sessions/sessionmanager.py", line 101, in start_kernel_for_session
self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
File "/home/djan/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 735, in run
value = future.result()
File "/home/djan/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 209, in wrapper
yielded = next(result)
File "/home/djan/anaconda3/lib/python3.7/site-packages/notebook/services/kernels/kernelmanager.py", line 168, in start_kernel
super(MappingKernelManager, self).start_kernel(**kwargs)
File "/home/djan/anaconda3/lib/python3.7/site-packages/jupyter_client/multikernelmanager.py", line 110, in start_kernel
km.start_kernel(**kwargs)
File "/home/djan/anaconda3/lib/python3.7/site-packages/jupyter_client/manager.py", line 240, in start_kernel
self.write_connection_file()
File "/home/djan/anaconda3/lib/python3.7/site-packages/jupyter_client/connect.py", line 547, in write_connection_file
kernel_name=self.kernel_name
File "/home/djan/anaconda3/lib/python3.7/site-packages/jupyter_client/connect.py", line 212, in write_connection_file
with secure_write(fname) as f:
File "/home/djan/anaconda3/lib/python3.7/contextlib.py", line 112, in __enter__
return next(self.gen)
File "/home/djan/anaconda3/lib/python3.7/site-packages/jupyter_client/connect.py", line 105, in secure_write
assert '0600' == oct(stat.S_IMODE(os.stat(fname).st_mode)).replace('0o', '0')
AssertionError
系统信息
运行在 Linux 服务器上安装 Jupyter (v. 1.0.0),使用 anaconda3 (v. 2019.07) 64 位。
可用内核
可用内核:
python3 /home/djan/.local/share/jupyter/kernels/python3
nn /home/djan/.local/share/jupyter/kernels/nn
重现问题
- 安装最新的 anaconda3 版本。
- 运行 基本版本的 Jupyter notebook --> 内核运行良好
- 使用 python 创建新环境:
conda create -n test python=3.7
- 激活环境后,Jupyter notebook 不可用,必须通过Conda安装:
conda install -c anaconda jupyter
- 运行 测试环境中的 Jupyter notebook --> 内核如上文所述发生故障
到目前为止我尝试了什么
在 Conda 环境中的服务器上 运行 Jupyter 时,文件权限似乎存在问题。我试图为我的 anaconda3 文件夹中的所有文件提供请求的权限 (0600),但这没有帮助。
更新
事实证明,最新版本的 jupyter_client
(在 anaconda 下可用,版本为 5.3.3)破坏了服务器上的 Jupyter 环境。
通过以下命令安装以前版本的 jupyter_client 修复了此问题:
conda install -c anaconda jupyter_client=5.3.1
不错 更新
事实证明,最新版本的 jupyter_client(在 anaconda 下可用,版本为 5.3.3)破坏了服务器上的 Jupyter 环境。
通过以下命令安装以前版本的 jupyter_client 修复了此问题:
conda install -c anaconda jupyter_client=5.3.1