Jupyter Lab無法打開終端窗口的解決方法
錯誤描述
本地Anaconda使用pip install jupyterlab后使用jupyter-lab打開窗口創(chuàng)建Terminal出現(xiàn)錯誤Launcher Error、Unhandled error、Dismiss

解決方案
通過查詢Anaconda窗口信息發(fā)現(xiàn)報錯如下:
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.
可以發(fā)現(xiàn)報錯的原因是JupyterLab在創(chuàng)建Ternimal時無法定位到PowerShell。為此,我通過CMD啟用PowerShell仍然失敗,如下所示:

因此懷疑時是環(huán)境變量中缺少`PowerShell`路徑,因此我找到`PowerShell`路徑并添加至環(huán)境變量,如下所示




完成后在CMD中輸入PowerShell即可進入PowerShell模式

此時打開Anaconda啟動JupyterLab,即可正常啟動Terminal,如下所示:

總結(jié)
如果在Win10平臺使用JupyterLab無法正常啟動Terminal且報錯為FileNotFoundError: The command was not found or was not executable: powershell.exe.,只需要在環(huán)境變量中添加PowerShell路徑
到此這篇關于Jupyter Lab無法打開終端窗口的解決方法的文章就介紹到這了,更多相關Jupyter Lab終端窗口內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關文章希望大家以后多多支持腳本之家!
相關文章
詳解pytorch中squeeze()和unsqueeze()函數(shù)介紹
這篇文章主要介紹了詳解pytorch中squeeze()和unsqueeze()函數(shù)介紹,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧2020-09-09
Pytorch加載數(shù)據(jù)集的方式總結(jié)及補充
Pytorch自定義數(shù)據(jù)集方法,應該是用pytorch做算法的最基本的東西,下面這篇文章主要給大家介紹了關于Pytorch加載數(shù)據(jù)集的方式總結(jié)及補充,文中通過實例代碼介紹的非常詳細,需要的朋友可以參考下2022-11-11
python爬取”頂點小說網(wǎng)“《純陽劍尊》的示例代碼
這篇文章主要介紹了python爬取”頂點小說網(wǎng)“《純陽劍尊》的示例代碼,幫助大家更好的利用python 爬蟲爬取數(shù)據(jù),感興趣的朋友可以了解下2020-10-10
Python標準模塊--ContextManager上下文管理器的具體用法
本篇文章主要介紹了Python標準模塊--ContextManager的具體用法,小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧2017-11-11
基于pandas數(shù)據(jù)清洗的實現(xiàn)示例
數(shù)據(jù)清洗是數(shù)據(jù)科學和數(shù)據(jù)分析中非常重要的一個步驟,本文主要介紹了基于pandas的數(shù)據(jù)清洗,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧2024-07-07

