Jupyter Lab Terminal 無法開啟
Jupyter Lab(Jupyter Notebook也是)突然無法打開Terminal,重灌了Anaconda好幾次,且試過多種版本但還是無法打開 以下是Navigator回報的錯誤 想問有什麼辦法能徹底重置設定或是修正 [I 19:02:23.726 LabApp] The port 8888 is already in use, trying another port. [I 19:02:23.734 LabApp] JupyterLab extension loaded from D:\anaconda3\lib\site-packages\jupyterlab [I 19:02:23.734 LabApp] JupyterLab application directory is D:\anaconda3\share\jupyter\lab [I 19:02:23.736 LabApp] Serving notebooks from local directory: D:/ [I 19:02:23.736 LabApp] Jupyter Notebook 6.1.4 is running at: [I 19:02:23.736 LabApp] http://localhost:8889/?token=f1ad536cbdfec87c089653f7ab2088a69ec87ccc71a0dd21 [I 19:02:23.736 LabApp] or http://127.0.0.1:8889/?token=f1ad536cbdfec87c089653f7ab2088a69ec87ccc71a0dd21 [I 19:02:23.737 LabApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [C 19:02:23.749 LabApp] To access the notebook, open this file in a browser: file:///C:/Users/ddtbc/AppData/Roaming/jupyter/runtime/nbserver-12272-open.html Or copy and paste one of these URLs: http://localhost:8889/?token=f1ad536cbdfec87c089653f7ab2088a69ec87ccc71a0dd21 or http://127.0.0.1:8889/?token=f1ad536cbdfec87c089653f7ab2088a69ec87ccc71a0dd21 [W 19:02:25.530 LabApp] Could not determine jupyterlab build status without nodejs [E 19:02:27.367 LabApp] Uncaught exception POST /api/terminals?1607857347363 (::1) HTTPServerRequest(protocol='http', host='localhost:8889', method='POST', uri='/api/terminals?1607857347363', version='HTTP/1.1', remote_ip='::1') Traceback (most recent call last): File "D:\anaconda3\lib\site-packages\tornado\web.py", line 1701, in _execute result = method(*self.path_args, **self.path_kwargs) File "D:\anaconda3\lib\site-packages\tornado\web.py", line 3178, in wrapper return method(self, *args, **kwargs) File "D:\anaconda3\lib\site-packages\notebook\terminal\api_handlers.py", line 15, in post model = self.terminal_manager.create() File "D:\anaconda3\lib\site-packages\notebook\terminal\terminalmanager.py", line 46, in create name, term = self.new_named_terminal() File "D:\anaconda3\lib\site-packages\terminado\management.py", line 337, in new_named_terminal term = self.new_terminal(**kwargs) File "D:\anaconda3\lib\site-packages\terminado\management.py", line 180, in new_terminal return PtyWithClients(argv, env, cwd) File "D:\anaconda3\lib\site-packages\terminado\management.py", line 46, in __init__ self.ptyproc = PtyProcessUnicode.spawn(argv, env=env, cwd=cwd) File "D:\anaconda3\lib\site-packages\winpty\ptyprocess.py", line 87, in spawn raise FileNotFoundError( FileNotFoundError: The command was not found or was not executable: powershell.exe. [W 19:02:27.369 LabApp] Unhandled error [E 19:02:27.369 LabApp] { "Host": "localhost:8889", "Connection": "keep-alive", "Content-Length": "0", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36", "X-Xsrftoken": "2|c6516838|b35fa91e95a7cf18b19c2ae15e8ccdfe|1607446327", "Authorization": "token f1ad536cbdfec87c089653f7ab2088a69ec87ccc71a0dd21", "Content-Type": "application/json", "Accept": "*/*", "Origin": "http://localhost:8889", "Sec-Fetch-Site": "same-origin", "Sec-Fetch-Mode": "cors", "Sec-Fetch-Dest": "empty", "Referer": "http://localhost:8889/lab", "Accept-Encoding": "gzip, deflate, br", "Accept-Language": "zh-TW,zh;q=0.9,en-US;q=0.8,en;q=0.7", "Cookie": "_xsrf=2|c6516838|b35fa91e95a7cf18b19c2ae15e8ccdfe|1607446327; username-localhost-8891=\"2|1:0|10:1607855555|23:username-localhost-8891|44:YmU2ZTBlY2JlZmQxNDUyYmFhNjZkMWFiZGY4YjhkZWU=|8a817014a3bd2a6e90b22412b79de59e83eb388f6ff1b2e8a5d4d8027fc2dab3\"; username-localhost-8890=\"2|1:0|10:1607855560|23:username-localhost-8890|44:ZDUyNmQ2ZTMzMWEwNGI3YmI5NWFjYThmNTc4YWNiOWU=|04d607194286bcaca8fe27833f8ef93708eb7a22a6e5dc8b64f255c5a36197e5\"; username-localhost-8892=\"2|1:0|10:1607855590|23:username-localhost-8892|44:ZjVmYzk1MmI5ZDViNDk1ODg1YTU4NDQ4OWQyY2YzNWQ=|72c5f37287e7add119e4b8309610192890ee55b3450ecc9cce42a8ba24e717a1\"; username-localhost-8888=\"2|1:0|10:1607857177|23:username-localhost-8888|44:YTQ3ODMyNTNkNDVlNGRkMjk3NGIyNjQ0NzMxMWU2MjU=|8408927cd29d72ce570e4aebff6bd6624a0363195f08bf8ac7bd14680386d7d9\"; username-localhost-8889=\"2|1:0|10:1607857347|23:username-localhost-8889|44:MjdiNDViZmY1MzRhNDJmZmEwN2IyNzZlYjI1YzcyYzk=|9981717bcf44d719ecd358868bff437a90ff56f372111b2f27355edf803379a2\"" } [E 19:02:27.369 LabApp] 500 POST /api/terminals?1607857347363 (::1) 3.00ms referer=http://localhost:8889/lab [E 19:02:29.227 LabApp] Uncaught exception POST /api/terminals?1607857349224 (::1) HTTPServerRequest(protocol='http', host='localhost:8889', method='POST', uri='/api/terminals?1607857349224', version='HTTP/1.1', remote_ip='::1') Traceback (most recent call last): File "D:\anaconda3\lib\site-packages\tornado\web.py", line 1701, in _execute result = method(*self.path_args, **self.path_kwargs) File "D:\anaconda3\lib\site-packages\tornado\web.py", line 3178, in wrapper return method(self, *args, **kwargs) File "D:\anaconda3\lib\site-packages\notebook\terminal\api_handlers.py", line 15, in post model = self.terminal_manager.create() File "D:\anaconda3\lib\site-packages\notebook\terminal\terminalmanager.py", line 46, in create name, term = self.new_named_terminal() File "D:\anaconda3\lib\site-packages\terminado\management.py", line 337, in new_named_terminal term = self.new_terminal(**kwargs) File "D:\anaconda3\lib\site-packages\terminado\management.py", line 180, in new_terminal return PtyWithClients(argv, env, cwd) File "D:\anaconda3\lib\site-packages\terminado\management.py", line 46, in __init__ self.ptyproc = PtyProcessUnicode.spawn(argv, env=env, cwd=cwd) File "D:\anaconda3\lib\site-packages\winpty\ptyprocess.py", line 87, in spawn raise FileNotFoundError( FileNotFoundError: The command was not found or was not executable: powershell.exe. [W 19:02:29.228 LabApp] Unhandled error [E 19:02:29.228 LabApp] { "Host": "localhost:8889", "Connection": "keep-alive", "Content-Length": "0", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36", "X-Xsrftoken": "2|c6516838|b35fa91e95a7cf18b19c2ae15e8ccdfe|1607446327", "Authorization": "token f1ad536cbdfec87c089653f7ab2088a69ec87ccc71a0dd21", "Content-Type": "application/json", "Accept": "*/*", "Origin": "http://localhost:8889", "Sec-Fetch-Site": "same-origin", "Sec-Fetch-Mode": "cors", "Sec-Fetch-Dest": "empty", "Referer": "http://localhost:8889/lab", "Accept-Encoding": "gzip, deflate, br", "Accept-Language": "zh-TW,zh;q=0.9,en-US;q=0.8,en;q=0.7", "Cookie": "_xsrf=2|c6516838|b35fa91e95a7cf18b19c2ae15e8ccdfe|1607446327; username-localhost-8891=\"2|1:0|10:1607855555|23:username-localhost-8891|44:YmU2ZTBlY2JlZmQxNDUyYmFhNjZkMWFiZGY4YjhkZWU=|8a817014a3bd2a6e90b22412b79de59e83eb388f6ff1b2e8a5d4d8027fc2dab3\"; username-localhost-8890=\"2|1:0|10:1607855560|23:username-localhost-8890|44:ZDUyNmQ2ZTMzMWEwNGI3YmI5NWFjYThmNTc4YWNiOWU=|04d607194286bcaca8fe27833f8ef93708eb7a22a6e5dc8b64f255c5a36197e5\"; username-localhost-8892=\"2|1:0|10:1607855590|23:username-localhost-8892|44:ZjVmYzk1MmI5ZDViNDk1ODg1YTU4NDQ4OWQyY2YzNWQ=|72c5f37287e7add119e4b8309610192890ee55b3450ecc9cce42a8ba24e717a1\"; username-localhost-8888=\"2|1:0|10:1607857177|23:username-localhost-8888|44:YTQ3ODMyNTNkNDVlNGRkMjk3NGIyNjQ0NzMxMWU2MjU=|8408927cd29d72ce570e4aebff6bd6624a0363195f08bf8ac7bd14680386d7d9\"; username-localhost-8889=\"2|1:0|10:1607857347|23:username-localhost-8889|44:OGY0MmZlOWEzNWY0NDI0ZDliNTI0YTExNTI5ODVjOGI=|ffbf5a26bc397adfd64c776b677a47bb4594eabf5fc6891aea54047d5e5735fd\"" } [E 19:02:29.228 LabApp] 500 POST /api/terminals?1607857349224 (::1) 2.00ms referer=http://localhost:8889/lab ![image](http://kwassistfile.cupoy.com/000001765BCAAA720000001B6375706F795F72656C656173655155455354/1607663669748/large)
回答列表
-
2020/12/14 上午 09:15Sung-Yi Wang贊同數:0不贊同數:0留言數:1
我自己的不是Windows環境,不過從錯誤訊息來看,是因為找不到powershell.exe導致anaconda執行有問題,你可能要從系統路徑變數那邊看看是不是有設錯或被誤刪
-
2020/12/16 下午 03:46張維元 (WeiYuan)贊同數:0不贊同數:0留言數:0
嗨,你好
這是環境的問題,比較難給一個標準的答案,建議重新安裝或是換電腦試試看。
嗨,你好,我是維元,持續在不同的平台發表對 #資料科學、 #網頁開發 或 #軟體職涯 相關的文章。如果對於內文有疑問都歡迎與我們進一步的交流,都可以追蹤我的 Facebook 或 技術部落格 ,也會不定時的舉辦分享活動,一起來玩玩吧 ヽ(●´∀`●)ノ
-
2020/12/16 下午 07:28Jeffrey贊同數:0不贊同數:0留言數:0
Hello, 感覺上像是執行權限的問題. 有幾個方向: 1. 確認是管理者權限 2. 確認瀏覽器權限 所以, 可以嘗試直接執行Jupyter, 會跳出一個 terminal: [I 18:33:14.745 NotebookApp] JupyterLab extension loaded from C:\Users\Jeffrey.yc Chen\anaconda3\lib\site-packages\jupyterlab [I 18:33:14.746 NotebookApp] JupyterLab application directory is C:\Users\Jeffrey.yc Chen\anaconda3\share\jupyter\lab [I 18:33:14.755 NotebookApp] Serving notebooks from local directory: C:\Users\Jeffrey.yc Chen [I 18:33:14.755 NotebookApp] The Jupyter Notebook is running at: [I 18:33:14.755 NotebookApp] http://localhost:8888/?token=94351e8dc1d2eda90754d29823cdefe638a67ba5d052eee7 [I 18:33:14.755 NotebookApp] or http://127.0.0.1:8888/?token=94351e8dc1d2eda90754d29823cdefe638a67ba5d052eee7 [I 18:33:14.755 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [C 18:33:14.920 NotebookApp] To access the notebook, open this file in a browser: file:///C:/Users/Jeffrey.yc%20Chen/AppData/Roaming/jupyter/runtime/nbserver-10700-open.html Or copy and paste one of these URLs: http://localhost:8888/?token=94351e8dc1d2eda90754d29823cdefe638a67ba5d052eee7 or http://127.0.0.1:8888/?token=94351e8dc1d2eda90754d29823cdefe638a67ba5d052eee7 直接複製最後一個代IP的網址貼在瀏覽器上執行