작성
·
301
0
쥬피터 노트북 파일에서 코드 부분의 간단한 스크립트를 실행하면 "1+1" 한참 시간이 소요되고 그 후에 아래와 같은 오류가 나타납니다.
어디를 보아야 할까요?.. ㅡㅡ
"Failed to start the Kernel.
Unable to start Kernel 'ch02_env (Python)' due to a timeout waiting for the ports to get used.
View Jupyter [log](command:jupyter.viewOutput) for further details."
상세 로그는 아래와 같습니다.
Visual Studio Code (1.85.1, undefined, desktop)
Jupyter Extension Version: 2023.11.1003402403.
Python Extension Version: 2023.22.1.
Pylance Extension Version: 2023.12.1.
Platform: win32 (x64).
Workspace folder k:\My files\Inflearn_chatgpt\inflearn_chatGPT-main\ch02, Home = c:\Users\parkdg
09:59:34.230 [info] Start refreshing Kernel Picker (1703206774230)
09:59:34.236 [info] Using Pylance
09:59:34.620 [info] Start refreshing Interpreter Kernel Picker
09:59:36.436 [info] Starting Kernel startUsingPythonInterpreter, .jvsc74a57bd0d4a87738910ea0fd9afa86e7d6320d0a9ae5dfbb4e715529ddcf2fa326b6cdcd.k:\My files\Inflearn_chatgpt\inflearn_chatGPT-main\ch02\ch02_env\Scripts\python.exe.k:\My files\Inflearn_chatgpt\inflearn_chatGPT-main\ch02\ch02_env\Scripts\python.exe.-m#ipykernel_launcher (Python Path: k:\My files\Inflearn_chatgpt\inflearn_chatGPT-main\ch02\ch02_env\Scripts\python.exe, Venv, ch02_env, 3.11.6) for 'k:\My files\Inflearn_chatgpt\inflearn_chatGPT-main\ch02\01_Jupyter_Notebook_Exp.ipynb' (disableUI=true)
10:00:09.900 [warn] Failed to get activated env vars for k:\My files\Inflearn_chatgpt\inflearn_chatGPT-main\ch02\ch02_env\Scripts\python.exe in 33842ms
10:00:09.901 [error] Unable to determine site packages path for python k:\My files\Inflearn_chatgpt\inflearn_chatGPT-main\ch02\ch02_env\Scripts\python.exe (Venv)
10:00:22.738 [info] Process Execution: k:\My files\Inflearn_chatgpt\inflearn_chatGPT-main\ch02\ch02_env\Scripts\python.exe -m pip list
10:00:22.779 [warn] Failed to get activated env vars for k:\My files\Inflearn_chatgpt\inflearn_chatGPT-main\ch02\ch02_env\Scripts\python.exe in 46034ms
10:00:22.779 [error] Unable to determine site packages path for python k:\My files\Inflearn_chatgpt\inflearn_chatGPT-main\ch02\ch02_env\Scripts\python.exe (Venv)
10:00:30.146 [info] Process Execution: k:\My files\Inflearn_chatgpt\inflearn_chatGPT-main\ch02\ch02_env\Scripts\python.exe -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
10:00:30.327 [warn] Failed to get activated env vars for ~\AppData\Local\Programs\Python\Python311\python.exe in 173ms
10:00:30.497 [info] Process Execution: ~\AppData\Local\Programs\Python\Python311\python.exe -c "import site;print("USER_BASE_VALUE");print(site.USER_SITE);print("USER_BASE_VALUE");"
10:00:31.657 [info] Process Execution: ~\AppData\Local\Programs\Python\Python311\python.exe ~\.vscode\extensions\ms-toolsai.jupyter-2023.11.1003402403-win32-x64\pythonFiles\vscode_datascience_helpers\kernel_interrupt_daemon.py --ppid 40304
> cwd: ~\.vscode\extensions\ms-toolsai.jupyter-2023.11.1003402403-win32-x64\pythonFiles\vscode_datascience_helpers
10:00:39.590 [info] Process Execution: k:\My files\Inflearn_chatgpt\inflearn_chatGPT-main\ch02\ch02_env\Scripts\python.exe -m ipykernel_launcher --f=~\AppData\Roaming\jupyter\runtime\kernel-v2-403047aAa1r83eMCu.json
> cwd: k:\My files\Inflearn_chatgpt\inflearn_chatGPT-main\ch02
10:00:40.761 [info] End refreshing Kernel Picker (1703206774230)
10:01:25.672 [info] Handle Execution of Cells 2 for k:\My files\Inflearn_chatgpt\inflearn_chatGPT-main\ch02\01_Jupyter_Notebook_Exp.ipynb
10:01:39.606 [error] waitUntilUsed timed out [Error: timeout
at Timeout.d (~\.vscode\extensions\ms-toolsai.jupyter-2023.11.1003402403-win32-x64\dist\extension.node.js:55:1754)
at listOnTimeout (node:internal/timers:569:17)
at process.processTimers (node:internal/timers:512:7)]
10:01:39.606 [error] Disposing kernel process due to an error Error: Unable to start Kernel 'ch02_env (Python)' due to a timeout waiting for the ports to get used.
View Jupyter [log](command:jupyter.viewOutput) for further details.
안녕하세요 쭌랩입니다.
해결되셨다니 다행이네요!
제 추측으로는 venv로 가상환경을 새로 생성하고 해당 가상환경으로 쥬피터 노트북 실행을 하려면
위의 명령어로 jupyter 패키지를 설치해야 합니다. 보통 VS code 환경에서는 만약 가상 환경에 설치가 되어있지 않으면 자동으로 설치하라는 안내 메세지가 뜹니다.
혹시 후속 실습 진행하시다가 비슷한 에러가 발생하면 위의 명령어로 jupyter 설치 후 실행하시면 문제가 해결 될 것입니다.
감사합니다!