问题介绍
在Windows环境下部署Jupyter(Jupyter NoteBook, Jupyter Lab)存在Ctrl-C失效无法shutdown本进程的问题。表现如下:
- 复制粘贴可用:
Ctrl+C
,Ctrl+V
,Command+C
,Command+V
可以使用【排除快捷键冲突】 - 当程序运行时,使用
Crtl+C
强制结束程序时无效。以nvidia-smi -l 1
为例,运行后无法退出只能终止该terminal
解决方案
- 修改配置项将终端设定为git bash
c.ServerApp.terminado_settings = {'shell_command' : ['C:\\Program Files\\Git\\bin\\bash.exe']}
其他
- 调整为git bash后会出现conda无法识别的情况,此时需要加入环境变量或其他,参考其他文章。
git bash环境变量:https://blog.csdn.net/xovee/article/details/126949439
git bash无法使用conda:https://blog.csdn.net/weixin_44728640/article/details/121088000 - 经测试,调整为
C:\Windows\System32\cmd.exe
同样有ctrl+c无效的问题。 - 如果想要继续使用powershell,可以输入
powershell
进入常用的终端中操作。