jupyter lab无法打开终端窗口的解决方法-kb88凯时官网登录

来自:网络
时间:2023-09-07
阅读:
目录

错误描述

本地anaconda使用pip install jupyterlab后使用jupyter-lab打开窗口创建terminal出现错误launcher errorunhandled errordismiss

kb88凯时官网登录的解决方案

通过查询anaconda窗口信息发现报错如下:

traceback (most recent call last):
      file "e:\anaconda3\envs\pytorch1.6.0\lib\site-packages\tornado\web.py", line 1702, in _execute
        result = method(*self.path_args, **self.path_kwargs)
      file "e:\anaconda3\envs\pytorch1.6.0\lib\site-packages\tornado\web.py", line 3173, in wrapper
        return method(self, *args, **kwargs)
      file "e:\anaconda3\envs\pytorch1.6.0\lib\site-packages\jupyter_server\terminal\api_handlers.py", line 26, in post
        name, _ = self.terminal_manager.new_named_terminal(**data)
      file "e:\anaconda3\envs\pytorch1.6.0\lib\site-packages\terminado\management.py", line 319, in new_named_terminal
        term = self.new_terminal(**kwargs)
      file "e:\anaconda3\envs\pytorch1.6.0\lib\site-packages\terminado\management.py", line 171, in new_terminal
        pty = ptyprocessunicode.spawn(argv, env=env, cwd=options.get('cwd', none))
      file "e:\anaconda3\envs\pytorch1.6.0\lib\site-packages\winpty\ptyprocess.py", line 89, in spawn
        'executable: %s.' % command
    filenotfounderror: the command was not found or was not executable: powershell.exe.

可以发现报错的原因是jupyterlab在创建ternimal时无法定位到powershell。为此,我通过cmd启用powershell仍然失败,如下所示:

因此怀疑时是环境变量中缺少`powershell`路径,因此我找到`powershell`路径并添加至环境变量,如下所示

完成后在cmd中输入powershell即可进入powershell模式

此时打开anaconda启动jupyterlab,即可正常启动terminal,如下所示:

总结

如果在win10平台使用jupyterlab无法正常启动terminal且报错为filenotfounderror: the command was not found or was not executable: powershell.exe.,只需要在环境变量中添加powershell路径

返回顶部
顶部
网站地图