vscode-jupyter: Kernel won't start due to connection timeout

Environment data

  • VS Code version: 1.83.1
  • Jupyter Extension version (available under the Extensions sidebar): v2023.9.1102792234
  • Python Extension version (available under the Extensions sidebar): v2023.18.0
  • OS (Windows | Mac | Linux distro) and version: Mac (Intel)
  • Python and/or Anaconda version: 3.11.6
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): N/A
  • Jupyter server running: Local | Remote | N/A

Expected behaviour

When I close the notebook, or choose Restart Kernel, the kernal restarts and I can run cells again.

Actual behaviour

It gets stuck on interrupting the kernel. Closing the file, and quittting vscode both do not fix the issue. The first cell I try to run remains stuck on pending. The only work around I could figure out was turning the running cell into markdown, running a different cell, and then turning the first cell back to code before running again. Talk about a headache.

Steps to reproduce:

[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

  1. Open notebook where first cell is stuck on pending
  2. Try to run cell -> Nothing happens
  3. Try to restart kernel -> gets stuck
  4. Try to close and reopen file -> still stuck
  5. Try to quit VSCode and reopen file -> still stuck

Logs

Output for Jupyter in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Jupyter)

Visual Studio Code (1.83.1, undefined, desktop)
Jupyter Extension Version: 2023.9.1102792234.
Python Extension Version: 2023.18.0.
Platform: darwin (x64).
Multiple Workspace folders opened ~/F1, ~/F2
16:27:16.723 [info] User belongs to experiment group 'NewJupyterSession'
16:27:18.346 [info] Start refreshing Kernel Picker (1697527638346)
16:27:18.350 [info] Not using Pylance
16:27:18.732 [info] Start refreshing Interpreter Kernel Picker
16:27:22.017 [info] Starting Kernel startUsingPythonInterpreter, .jvsc74a57bd0aee8b7b246df8f9039afb4144a1f6fd8d2ca17a180786b69acc140d282b71a49./usr/local/bin/python3./usr/local/bin/python3.-m#ipykernel_launcher  (Python Path: /usr/local/bin/python3, Unknown, 3.11.6) for '~/xxx.ipynb' (disableUI=true)
16:27:24.789 [info] Registering dummy command feature
16:27:28.591 [warn] Failed to get activated env vars for /usr/local/bin/python3 in 10053ms
16:27:28.596 [info] Process Execution: /usr/local/bin/python3 -c "import site;print("USER_BASE_VALUE");print(site.USER_BASE);print("USER_BASE_VALUE");"
16:27:28.673 [warn] Failed to get activated env vars for /usr/local/bin/python3 in 6383ms
16:27:28.822 [info] Process Execution: /usr/local/bin/python3 -m pip list
16:27:28.826 [info] Process Execution: /usr/local/bin/python3 -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
16:27:28.830 [info] Process Execution: /usr/local/bin/python3 -m ipykernel_launcher --ip=127.0.0.1 --stdin=9003 --control=9001 --hb=9000 --Session.signature_scheme="hmac-sha256" --Session.key=b"1821fd21-0e34-455d-819b-807556cff7e2" --shell=9002 --transport="tcp" --iopub=9004 --f=~/Library/Jupyter/runtime/kernel-v2-7605PWguFGT2ShOw.json
    > cwd: ~/analysis
16:27:31.583 [info] ipykernel version & path 6.20.2, ~/Library/Python/3.11/lib/python/site-packages/ipykernel/__init__.py for /usr/local/bin/python3
16:27:31.584 [info] End refreshing Kernel Picker (1697527638346)
16:27:34.135 [error] Error: Message Decoding: Incorrect;
Obtained "0ce2a2a270976420f883cd5fb1081f8941f9d4685f701006472b0f1d28a47c9b"
Expected "6cb5fc10aacde47c33e7210a8dc53cf6f447c8efa7acc9a4bad7e7dc43a387eb"
    at Object.t.Jx (~/.vscode/extensions/ms-toolsai.jupyter-2023.9.1102792234-darwin-x64/out/extension.node.js:2:315668)
    at WebSocket.onIncomingMessage (~/.vscode/extensions/ms-toolsai.jupyter-2023.9.1102792234-darwin-x64/out/extension.node.js:24:104652)
    at WebSocket.processSocketMessages (~/.vscode/extensions/ms-toolsai.jupyter-2023.9.1102792234-darwin-x64/out/extension.node.js:24:103996)
16:27:35.187 [warn] StdErr from Kernel Process 0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
16:27:35.796 [warn] StdErr from Kernel Process Traceback (most recent call last):
16:27:35.796 [warn] StdErr from Kernel Process File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "~/Library/Python/3.11/lib/python/site-packages/ipykernel_launcher.py", line 17, in <module>
    app.launch_new_instance()
  File "~/Library/Python/3.11/lib/python/site-packages/traitlets/config/application.py", line 1040, in launch_instance
    app.initialize(argv)
  File "~/Library/Python/3.11/lib/python/site-packages/traitlets/config/application.py", line 113, in inner
    return method(app, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "~/Library/Python/3.11/lib/python/site-packages/ipykernel/kernelapp.py", line 677, in initialize
    self.init_sockets()
  File "~/Library/Python/3.11/lib/python/site-packages/ipykernel/kernelapp.py", line 316, in init_sockets
    self.shell_port = self._bind_socket(self.shell_socket, self.shell_port)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "~/Library/Python/3.11/lib/python/site-packages/ipykernel/kernelapp.py", line 251, in _bind_socket
    return self._try_bind_socket(s, port)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "~/Library/Python/3.11/lib/python/site-packages/ipykernel/kernelapp.py", line 227, in _try_bind_socket
    s.bind("tcp://%s:%i" % (self.ip, port))
16:27:35.797 [warn] StdErr from Kernel Process File "~/Library/Python/3.11/lib/python/site-packages/zmq/sugar/socket.py", line 300, in bind
    super().bind(addr)
  File "zmq/backend/cython/socket.pyx", line 564, in zmq.backend.cython.socket.Socket.bind
  File "zmq/backend/cython/checkrc.pxd", line 28, in zmq.backend.cython.checkrc._check_rc
zmq.error.ZMQError: Address already in use
16:27:36.773 [error] Disposing session as kernel process died ExitCode: 1, Reason: zmq.error.ZMQError
16:27:36.773 [info] Dispose Kernel process 8395.
16:27:36.909 [warn] Didn't get response for requestKernelInfo after 3001ms.
16:27:51.733 [info] Handle Execution of Cells 0 for ~/xx.ipynb
16:30:44.695 [info] Handle Execution of Cells 0 for ~/xx.ipynb
16:34:31.537 [info] Handle Execution of Cells 0 for Untitled-1.ipynb
16:34:31.549 [info] Starting Kernel startUsingPythonInterpreter, .jvsc74a57bd0aee8b7b246df8f9039afb4144a1f6fd8d2ca17a180786b69acc140d282b71a49./usr/local/bin/python3./usr/local/bin/python3.-m#ipykernel_launcher  (Python Path: /usr/local/bin/python3, Unknown, 3.11.6) for 'Untitled-1.ipynb' (disableUI=false)
16:34:31.596 [warn] Failed to get activated env vars for /usr/local/bin/python3 in 43ms
16:34:31.598 [info] Process Execution: /usr/local/bin/python3 -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
16:34:31.599 [info] Process Execution: /usr/local/bin/python3 -m ipykernel_launcher --ip=127.0.0.1 --stdin=9013 --control=9006 --hb=9005 --Session.signature_scheme="hmac-sha256" --Session.key=b"30e9c416-ad5f-4b3b-a17c-9021e2ed3c56" --shell=9007 --transport="tcp" --iopub=9014 --f=~/Library/Jupyter/runtime/kernel-v2-76058aUlAjY8BjZr.json
    > cwd: ~/F1
16:34:31.611 [warn] Failed to get activated env vars for /usr/local/bin/python3 in 47ms
16:34:31.613 [info] Process Execution: /usr/local/bin/python3 -m pip list
16:34:31.869 [info] ipykernel version & path 6.20.2, ~/Library/Python/3.11/lib/python/site-packages/ipykernel/__init__.py for /usr/local/bin/python3
16:34:32.146 [warn] StdErr from Kernel Process 0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
16:34:32.509 [info] Process Execution: /usr/local/bin/python3 ~/.vscode/extensions/ms-toolsai.jupyter-2023.9.1102792234-darwin-x64/pythonFiles/printJupyterDataDir.py
16:34:32.519 [info] Kernel acknowledged execution of cell 0 @ 1697528072518
16:34:32.524 [info] End cell 0 execution @ 1697528072524, started @ 1697528072518, elapsed time = 0.006s
16:34:43.530 [info] Handle Execution of Cells 0 for Untitled-1.ipynb
16:34:43.537 [info] Kernel acknowledged execution of cell 0 @ 1697528083537
16:34:43.540 [info] End cell 0 execution @ 1697528083540, started @ 1697528083537, elapsed time = 0.003s
16:35:18.505 [info] Restart requested ~/xx.ipynb
16:36:38.175 [info] Dispose Kernel '~/xx.ipynb' associated with '~/xx.ipynb'
16:36:39.984 [info] Starting Kernel startUsingPythonInterpreter, .jvsc74a57bd0aee8b7b246df8f9039afb4144a1f6fd8d2ca17a180786b69acc140d282b71a49./usr/local/bin/python3./usr/local/bin/python3.-m#ipykernel_launcher  (Python Path: /usr/local/bin/python3, Unknown, 3.11.6) for '~/xx.ipynb' (disableUI=true)
16:36:40.030 [warn] Failed to get activated env vars for /usr/local/bin/python3 in 37ms
16:36:40.033 [info] Process Execution: /usr/local/bin/python3 -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
16:36:40.037 [info] Process Execution: /usr/local/bin/python3 -m ipykernel_launcher --ip=127.0.0.1 --stdin=9018 --control=9016 --hb=9015 --Session.signature_scheme="hmac-sha256" --Session.key=b"c45de363-ec50-4728-b9d9-d2d1eefeea7c" --shell=9017 --transport="tcp" --iopub=9019 --f=~/Library/Jupyter/runtime/kernel-v2-7605E6xM6CDCMfZX.json
    > cwd: ~/analysis
16:36:40.366 [info] ipykernel version & path 6.20.2, ~/Library/Python/3.11/lib/python/site-packages/ipykernel/__init__.py for /usr/local/bin/python3
16:36:40.790 [warn] StdErr from Kernel Process 0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
16:39:32.480 [info] Loading webview. View is notset
16:39:32.481 [info] Loading web view...
16:39:32.482 [info] Webview panel created.
16:39:32.759 [info] Web view react rendered
16:41:11.232 [info] Restart requested ~/xx.ipynb
16:41:11.232 [info] Dispose Kernel process 8969.
16:41:11.262 [warn] Failed to get activated env vars for /usr/local/bin/python3 in 24ms
16:41:11.264 [info] Process Execution: /usr/local/bin/python3 -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
16:41:11.267 [info] Process Execution: /usr/local/bin/python3 -m ipykernel_launcher --ip=127.0.0.1 --stdin=9023 --control=9021 --hb=9020 --Session.signature_scheme="hmac-sha256" --Session.key=b"e71a4625-3193-4124-b99f-8816fda14233" --shell=9022 --transport="tcp" --iopub=9024 --f=~/Library/Jupyter/runtime/kernel-v2-7605ZpbcQNPeUSlm.json
    > cwd: ~/analysis
16:41:11.479 [info] ipykernel version & path 6.20.2, ~/Library/Python/3.11/lib/python/site-packages/ipykernel/__init__.py for /usr/local/bin/python3
16:41:11.763 [warn] StdErr from Kernel Process 0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.

About this issue

  • Original URL
  • State: closed
  • Created 8 months ago
  • Comments: 58 (27 by maintainers)

Most upvoted comments

Oh yeah my bad. It installed in the local extensions but it didnt on the ssh machine.

I think it is now correct.

New logs:

Show Logs
Visual Studio Code (1.84.2, ssh-remote, desktop)
Jupyter Extension Version: 2023.11.100.
Python Extension Version: 2023.20.0.
Pylance Extension Version: 2023.11.10.
Platform: linux (x64).
Workspace folder /home/barbem4, Home = /home/barbem4
16:05:47.127 [debug] Get Custom Env Variables, Class name = am (started execution), Arg 1: undefined, Arg 2: "RunPythonCode"
16:05:47.130 [info] Start refreshing Kernel Picker (1699999547130)
16:05:47.171 [info] Using Pylance
16:05:47.670 [debug] Preferred Remote kernel for ~/projects/Initial SLE dataset/Linear models SLE/Experiments/Check_files.ipynb is undefined
16:05:48.019 [debug] No controller, hence notebook communications cannot be initialized for editor ~/projects/Initial SLE dataset/Linear models SLE/Experiments/Check_files.ipynb
16:05:48.019 [info] Start refreshing Interpreter Kernel Picker
16:05:49.744 [debug] Get Custom Env Variables, Class name = am, completed in 2617ms, has a truthy return value, Arg 1: undefined, Arg 2: "RunPythonCode"
16:05:49.745 [debug] Jupyter Paths /kernels: 
16:05:49.748 [debug] Kernel Spec Root Paths, /usr/share/jupyter/kernels, /usr/local/share/jupyter/kernels, ~/.local/share/jupyter/kernels
16:05:49.756 [debug] Search for KernelSpecs in Interpreter ~/.conda/envs/praxis_env/bin/python
16:05:49.757 [debug] Finding Global Python KernelSpecs
16:05:49.761 [debug] Search for KernelSpecs in Interpreter /usr/bin/python
16:05:49.762 [debug] Search for KernelSpecs in Interpreter /usr/local/bin/python3
16:05:49.763 [debug] Search for KernelSpecs in Interpreter /opt/miniconda/bin/python
16:05:49.765 [debug] Full interpreter list is length: 4, /usr/bin/python::Unknown:/usr/bin/python, /usr/local/bin/python3::Unknown:/usr/local/bin/python3, ~/.conda/envs/praxis_env/bin/python:praxis_env:Conda:~/.conda/envs/praxis_env/bin/python, /opt/miniconda/bin/python:base:Conda:/opt/miniconda/bin/python
16:05:49.769 [debug] Getting activated env variables, Class name = nd (started execution), Arg 1: "~", Arg 2: "~/.conda/envs/praxis_env/bin/python", Arg 3: undefined
16:05:49.769 [debug] Get Custom Env Variables, Class name = am (started execution), Arg 1: "~", Arg 2: "RunPythonCode"
16:05:49.770 [debug] Get Custom Env Variables, Class name = am, completed in 1ms, has a truthy return value, Arg 1: "~", Arg 2: "RunPythonCode"
16:05:50.026 [debug] Kernels for interpreter /usr/bin/python are .jvsc74a57bd0767d51c1340bd893661ea55ea3124f6de3c7a262a8b4abca0554b478b1e2ff90./usr/bin/python./usr/bin/python.-m#ipykernel_launcher
16:05:50.028 [debug] Kernels for interpreter /usr/local/bin/python3 are .jvsc74a57bd0aee8b7b246df8f9039afb4144a1f6fd8d2ca17a180786b69acc140d282b71a49./usr/local/bin/python3./usr/local/bin/python3.-m#ipykernel_launcher
16:05:50.029 [debug] Kernels for interpreter /opt/miniconda/bin/python are .jvsc74a57bd04c2b8563932708ac4f64e3bc4797ea8eb43fc7530baa7f01daadf5b46d7b1fd4./opt/miniconda/python./opt/miniconda/python.-m#ipykernel_launcher
16:05:50.039 [debug] Loading kernelspec from ~/.local/share/jupyter/kernels/python3/kernel.json 
16:05:50.044 [debug] Loading kernelspec from ~/.conda/envs/praxis_env/share/jupyter/kernels/python3/kernel.json for ~/.conda/envs/praxis_env/bin/python
16:05:50.075 [debug] Kernel Specs found in interpreter ~/.conda/envs/praxis_env/bin/python are [{"specFile":"~/.conda/envs/praxis_env/share/jupyter/kernels/python3/kernel.json","interpreterPath":"~/.conda/envs/praxis_env/bin/python","isRegisteredByVSC":"registeredByNewVersionOfExt","name":"pythonjvsc74a57bd0af59e808e2bb2d49f2aad3fcaa4e3b4707b54f609965d9d8e3585c2a4131334f","argv":["python","-m","ipykernel_launcher","-f","{connection_file}"],"language":"python","executable":"python","display_name":"Python 3 (ipykernel)","metadata":{"debugger":true,"vscode":{"originalSpecFile":"~/.conda/envs/praxis_env/share/jupyter/kernels/python3/kernel.json","originalDisplayName":"Python 3 (ipykernel)"}}}]
16:05:50.075 [debug] Hiding default kernel spec 'Python 3 (ipykernel)', 'pythonjvsc74a57bd0af59e808e2bb2d49f2aad3fcaa4e3b4707b54f609965d9d8e3585c2a4131334f', /python for interpreter ~/.conda/envs/praxis_env/bin/python and spec ~/.conda/envs/praxis_env/share/jupyter/kernels/python3/kernel.json
16:05:50.075 [debug] Kernels for interpreter ~/.conda/envs/praxis_env/bin/python are .jvsc74a57bd0af59e808e2bb2d49f2aad3fcaa4e3b4707b54f609965d9d8e3585c2a4131334f.~/.conda/envs/praxis_env/python.~/.conda/envs/praxis_env/python.-m#ipykernel_launcher
16:05:50.853 [debug] KernelProvider switched kernel to id = .jvsc74a57bd0af59e808e2bb2d49f2aad3fcaa4e3b4707b54f609965d9d8e3585c2a4131334f.~/.conda/envs/praxis_env/python.~/.conda/envs/praxis_env/python.-m#ipykernel_launcher
16:05:50.854 [debug] start the kernel, options.disableUI=true for ~/projects/Initial SLE dataset/Linear models SLE/Experiments/Check_files.ipynb
16:05:50.858 [debug] Initialize notebook communications for editor ~/projects/Initial SLE dataset/Linear models SLE/Experiments/Check_files.ipynb
16:05:50.858 [debug] Resolving notebook UI Comms (resolve) for ~/projects/Initial SLE dataset/Linear models SLE/Experiments/Check_files.ipynb
16:05:50.858 [debug] initialize CommonMessageCoordinator
16:05:50.904 [debug] Registering commtarget jupyter.widget
16:05:50.904 [debug] IPyWidgetMessageDispatcher.initialize
16:05:50.905 [debug] Attempting to determine version of IPyWidgets
16:05:50.906 [debug] Controller selection change completed
16:05:50.906 [debug] Waiting for IPyWidgets version
16:05:50.906 [debug] Waiting for IPyWidgets version promise
16:05:50.913 [info] Starting Kernel startUsingPythonInterpreter, .jvsc74a57bd0af59e808e2bb2d49f2aad3fcaa4e3b4707b54f609965d9d8e3585c2a4131334f.~/.conda/envs/praxis_env/python.~/.conda/envs/praxis_env/python.-m#ipykernel_launcher  (Python Path: ~/.conda/envs/praxis_env/bin/python, Conda, praxis_env, 3.9.18) for '~/projects/Initial SLE dataset/Linear models SLE/Experiments/Check_files.ipynb' (disableUI=true)
16:05:50.914 [debug] Creating raw notebook for resource '~/projects/Initial SLE dataset/Linear models SLE/Experiments/Check_files.ipynb'
16:05:50.978 [debug] Getting activated env variables, Class name = nd (started execution), Arg 1: "~/projects/Initial SLE dataset/Linear models SLE/Experiments/Check_files.ipynb", Arg 2: "~/.conda/envs/praxis_env/bin/python", Arg 3: undefined
16:05:50.978 [debug] Get Custom Env Variables, Class name = am (started execution), Arg 1: "~/projects/Initial SLE dataset/Linear models SLE/Experiments/Check_files.ipynb", Arg 2: "RunPythonCode"
16:05:50.979 [debug] Get Custom Env Variables, Class name = am, completed in 1ms, has a truthy return value, Arg 1: "~/projects/Initial SLE dataset/Linear models SLE/Experiments/Check_files.ipynb", Arg 2: "RunPythonCode"
16:05:51.215 [debug] Launching kernel .jvsc74a57bd0af59e808e2bb2d49f2aad3fcaa4e3b4707b54f609965d9d8e3585c2a4131334f.~/.conda/envs/praxis_env/python.~/.conda/envs/praxis_env/python.-m#ipykernel_launcher for ~/projects/Initial SLE dataset/Linear models SLE/Experiments/Check_files.ipynb in ~/projects/Initial SLE dataset/Linear models SLE/Experiments with ports 9011, 9010, 9014, 9012, 9013
16:05:51.332 [debug] Python API env change detected, add => '/bin/python'
16:05:52.099 [debug] Conda file returned by Python Extension is conda
16:05:52.153 [debug] Python API env change detected, add => '/bin/python3.6'
16:05:52.202 [debug] Python API env change detected, update => '/bin/python'
16:05:52.264 [debug] Python API env change detected, update => '/bin/python3.6'
16:05:52.287 [debug] Python API env change detected, update => '/bin/python'
16:05:52.292 [debug] Search for KernelSpecs in Interpreter /bin/python
16:05:52.293 [debug] Finding Global Python KernelSpecs
16:05:52.300 [debug] Kernels for interpreter /bin/python are .jvsc74a57bd0e7370f93d1d0cde622a1f8e1c04877d8463912d04d973331ad4851f04de6915a./bin/python./bin/python.-m#ipykernel_launcher
16:05:52.347 [debug] Python API env change detected, update => '/bin/python3.6'
16:05:52.352 [debug] Search for KernelSpecs in Interpreter /bin/python3.6
16:05:52.354 [debug] Full interpreter list is length: 6, /usr/bin/python::Unknown:/usr/bin/python, /usr/local/bin/python3::Unknown:/usr/local/bin/python3, ~/.conda/envs/praxis_env/bin/python:praxis_env:Conda:~/.conda/envs/praxis_env/bin/python, /opt/miniconda/bin/python:base:Conda:/opt/miniconda/bin/python, /bin/python::Unknown:/bin/python, /bin/python3.6::Unknown:/bin/python3.6
16:05:52.389 [debug] Kernels for interpreter /bin/python3.6 are .jvsc74a57bd0db0f6cbdde3eb805f0a229b988d6bd72d452c42e640dd9958b4355934ec01bf5./bin/python3.6./bin/python3.6.-m#ipykernel_launcher
16:05:52.483 [debug] Python API env change detected, add => '/usr/bin/python3.6'
16:05:52.579 [debug] Python API env change detected, update => '/usr/bin/python3.6'
16:05:52.681 [debug] Python API env change detected, update => '/usr/bin/python3.6'
16:05:52.687 [debug] Search for KernelSpecs in Interpreter /usr/bin/python3.6
16:05:52.690 [debug] Full interpreter list is length: 7, /usr/bin/python::Unknown:/usr/bin/python, /usr/local/bin/python3::Unknown:/usr/local/bin/python3, ~/.conda/envs/praxis_env/bin/python:praxis_env:Conda:~/.conda/envs/praxis_env/bin/python, /opt/miniconda/bin/python:base:Conda:/opt/miniconda/bin/python, /bin/python::Unknown:/bin/python, /bin/python3.6::Unknown:/bin/python3.6, /usr/bin/python3.6::Unknown:/usr/bin/python3.6
16:05:52.697 [debug] Kernels for interpreter /usr/bin/python3.6 are .jvsc74a57bd030295c5bec572e859485b1ffa5e89b8b3e2022ef6e3e739c1ac40f143a557caf./usr/bin/python3.6./usr/bin/python3.6.-m#ipykernel_launcher
16:05:52.831 [debug] Python API env change detected, update => '/usr/bin/python3.6m'
16:05:52.903 [debug] Python API env change detected, update => '/usr/bin/python3.6m'
16:05:52.913 [debug] Search for KernelSpecs in Interpreter /usr/bin/python3.6m
16:05:52.916 [debug] Full interpreter list is length: 7, /usr/bin/python::Unknown:/usr/bin/python, /usr/local/bin/python3::Unknown:/usr/local/bin/python3, ~/.conda/envs/praxis_env/bin/python:praxis_env:Conda:~/.conda/envs/praxis_env/bin/python, /opt/miniconda/bin/python:base:Conda:/opt/miniconda/bin/python, /bin/python::Unknown:/bin/python, /bin/python3.6::Unknown:/bin/python3.6, /usr/bin/python3.6m::Unknown:/usr/bin/python3.6m
16:05:52.949 [debug] Kernels for interpreter /usr/bin/python3.6m are .jvsc74a57bd0fdb70176b9f68a63fad060439e1eecc9dfd60edecc2378a4464637b9f14b2c93./usr/bin/python3.6m./usr/bin/python3.6m.-m#ipykernel_launcher
16:05:53.090 [debug] Python API env change detected, add => '~/sandbox/bin/python'
16:05:53.185 [debug] Got env vars with python ~/.conda/envs/praxis_env/bin/python, with env var count 51 in 3416ms. 
    PATH value is ~/.vscode-server/bin/1a5daa3a0231a0fbba4f14db7ec463cf99d7768e/bin/remote-cli:~/.conda/envs/bin:/opt/python-3.9.12/bin:~/local/bin:~/.vscode-server/bin/b3e4e68a0bc097f0ae7907b217c1119af9e03435/bin/remote-cli:~/.conda/envs/bin:/opt/python-3.9.12/bin:/opt/python-3.9.12/bin:~/.conda/envs/bin:~/.conda/envs/praxis_env/bin:/opt/miniconda/condabin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/usr/local/nz/bin:/usr/local/nz/bin64:/usr/local/texlive/2022/bin/x86_64-linux:/usr/local/nz/bin:/usr/local/nz/bin64:~/.fzf/bin and 
    Path value is undefined
16:05:53.185 [debug] Prepend PATH with python bin for ~/.conda/envs/praxis_env/bin/python
16:05:53.185 [debug] Activated Env Variables for ~/.conda/envs/praxis_env/bin/python, 
    PATH value is ~/.conda/envs/praxis_env/bin:~/.vscode-server/bin/1a5daa3a0231a0fbba4f14db7ec463cf99d7768e/bin/remote-cli:~/.conda/envs/bin:/opt/python-3.9.12/bin:~/local/bin:~/.vscode-server/bin/b3e4e68a0bc097f0ae7907b217c1119af9e03435/bin/remote-cli:~/.conda/envs/bin:/opt/python-3.9.12/bin:/opt/python-3.9.12/bin:~/.conda/envs/bin:~/.conda/envs/praxis_env/bin:/opt/miniconda/condabin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/usr/local/nz/bin:/usr/local/nz/bin64:/usr/local/texlive/2022/bin/x86_64-linux:/usr/local/nz/bin:/usr/local/nz/bin64:~/.fzf/bin and 
    Path value is undefined
16:05:53.186 [debug] Getting activated env variables, Class name = nd, completed in 3416ms, has a truthy return value, Arg 1: "~", Arg 2: "~/.conda/envs/praxis_env/bin/python", Arg 3: undefined
16:05:53.219 [info] Process Execution: ~/.conda/envs/praxis_env/bin/python -m pip list
16:05:53.223 [debug] Got env vars with python ~/.conda/envs/praxis_env/bin/python, with env var count 51 in 2245ms. 
    PATH value is ~/.vscode-server/bin/1a5daa3a0231a0fbba4f14db7ec463cf99d7768e/bin/remote-cli:~/.conda/envs/bin:/opt/python-3.9.12/bin:~/local/bin:~/.vscode-server/bin/b3e4e68a0bc097f0ae7907b217c1119af9e03435/bin/remote-cli:~/.conda/envs/bin:/opt/python-3.9.12/bin:/opt/python-3.9.12/bin:~/.conda/envs/bin:~/.conda/envs/praxis_env/bin:/opt/miniconda/condabin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/usr/local/nz/bin:/usr/local/nz/bin64:/usr/local/texlive/2022/bin/x86_64-linux:/usr/local/nz/bin:/usr/local/nz/bin64:~/.fzf/bin and 
    Path value is undefined
16:05:53.223 [debug] Prepend PATH with python bin for ~/.conda/envs/praxis_env/bin/python
16:05:53.223 [debug] Activated Env Variables for ~/.conda/envs/praxis_env/bin/python, 
    PATH value is ~/.conda/envs/praxis_env/bin:~/.vscode-server/bin/1a5daa3a0231a0fbba4f14db7ec463cf99d7768e/bin/remote-cli:~/.conda/envs/bin:/opt/python-3.9.12/bin:~/local/bin:~/.vscode-server/bin/b3e4e68a0bc097f0ae7907b217c1119af9e03435/bin/remote-cli:~/.conda/envs/bin:/opt/python-3.9.12/bin:/opt/python-3.9.12/bin:~/.conda/envs/bin:~/.conda/envs/praxis_env/bin:/opt/miniconda/condabin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/usr/local/nz/bin:/usr/local/nz/bin64:/usr/local/texlive/2022/bin/x86_64-linux:/usr/local/nz/bin:/usr/local/nz/bin64:~/.fzf/bin and 
    Path value is undefined
16:05:53.223 [debug] Getting activated env variables, Class name = nd, completed in 2245ms, has a truthy return value, Arg 1: "~/projects/Initial SLE dataset/Linear models SLE/Experiments/Check_files.ipynb", Arg 2: "~/.conda/envs/praxis_env/bin/python", Arg 3: undefined
16:05:53.244 [info] Process Execution: ~/.conda/envs/praxis_env/bin/python -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
16:05:53.244 [debug] Kernel Env Variables for ~/.vscode-server/extensions/ms-toolsai.jupyter-2023.11.100/temp/jupyter/kernels/pythonjvsc74a57bd0af59e808e2bb2d49f2aad3fcaa4e3b4707b54f609965d9d8e3585c2a4131334f/kernel.json, PATH value is ~/.conda/envs/praxis_env/bin:~/.vscode-server/bin/1a5daa3a0231a0fbba4f14db7ec463cf99d7768e/bin/remote-cli:~/.conda/envs/bin:/opt/python-3.9.12/bin:~/local/bin:~/.vscode-server/bin/b3e4e68a0bc097f0ae7907b217c1119af9e03435/bin/remote-cli:~/.conda/envs/bin:/opt/python-3.9.12/bin:/opt/python-3.9.12/bin:~/.conda/envs/bin:~/.conda/envs/praxis_env/bin:/opt/miniconda/condabin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/usr/local/nz/bin:/usr/local/nz/bin64:/usr/local/texlive/2022/bin/x86_64-linux:/usr/local/nz/bin:/usr/local/nz/bin64:~/.fzf/bin
16:05:53.270 [info] Process Execution: ~/.conda/envs/praxis_env/bin/python -m ipykernel_launcher --f=~/.local/share/jupyter/runtime/kernel-v2-41096mVL7SQryeeGd.json
    > cwd: ~/projects/Initial SLE dataset/Linear models SLE/Experiments
16:05:53.291 [debug] Python API env change detected, update => '~/sandbox/bin/python'
16:05:53.524 [debug] Python API env change detected, update => '~/sandbox/bin/python'
16:05:53.531 [debug] Search for KernelSpecs in Interpreter ~/sandbox/bin/python
16:05:53.534 [debug] Full interpreter list is length: 8, /usr/bin/python::Unknown:/usr/bin/python, /usr/local/bin/python3::Unknown:/usr/local/bin/python3, ~/.conda/envs/praxis_env/bin/python:praxis_env:Conda:~/.conda/envs/praxis_env/bin/python, /opt/miniconda/bin/python:base:Conda:/opt/miniconda/bin/python, /bin/python::Unknown:/bin/python, /bin/python3.6::Unknown:/bin/python3.6, /usr/bin/python3.6m::Unknown:/usr/bin/python3.6m, ~/sandbox/bin/python:sandbox:Venv:~/sandbox/bin/python
16:05:53.553 [debug] Loading kernelspec from ~/sandbox/share/jupyter/kernels/python3/kernel.json for ~/sandbox/bin/python
16:05:53.556 [debug] Kernel Specs found in interpreter ~/sandbox/bin/python are [{"specFile":"~/sandbox/share/jupyter/kernels/python3/kernel.json","interpreterPath":"~/sandbox/bin/python","isRegisteredByVSC":"registeredByNewVersionOfExt","name":"pythonjvsc74a57bd0b0e92fd24cd1235dca8a7d32022db8bc6b9211cbdc26753cfb27ff825bde661f","argv":["python","-m","ipykernel_launcher","-f","{connection_file}"],"language":"python","executable":"python","display_name":"Python 3 (ipykernel)","metadata":{"debugger":true,"vscode":{"originalSpecFile":"~/sandbox/share/jupyter/kernels/python3/kernel.json","originalDisplayName":"Python 3 (ipykernel)"}}}]
16:05:53.557 [debug] Hiding default kernel spec 'Python 3 (ipykernel)', 'pythonjvsc74a57bd0b0e92fd24cd1235dca8a7d32022db8bc6b9211cbdc26753cfb27ff825bde661f', /python for interpreter ~/sandbox/bin/python and spec ~/sandbox/share/jupyter/kernels/python3/kernel.json
16:05:53.557 [debug] Kernels for interpreter ~/sandbox/bin/python are .jvsc74a57bd0b0e92fd24cd1235dca8a7d32022db8bc6b9211cbdc26753cfb27ff825bde661f.~/sandbox/python.~/sandbox/python.-m#ipykernel_launcher
16:05:53.566 [debug] Python API env change detected, update => '~/.conda/envs/praxis_env/bin/python'
16:05:53.576 [debug] Python API env change detected, update => '/bin/python'
16:05:53.585 [debug] Python API env change detected, update => '/bin/python3.6'
16:05:53.594 [debug] Python API env change detected, update => '/usr/bin/python'
16:05:53.606 [debug] Python API env change detected, update => '/usr/bin/python3.6m'
16:05:53.627 [debug] Full interpreter list is length: 8, /usr/bin/python::Unknown:/usr/bin/python, /usr/local/bin/python3::Unknown:/usr/local/bin/python3, ~/.conda/envs/praxis_env/bin/python:praxis_env:Conda:~/.conda/envs/praxis_env/bin/python, /opt/miniconda/bin/python:base:Conda:/opt/miniconda/bin/python, /bin/python::Unknown:/bin/python, /bin/python3.6::Unknown:/bin/python3.6, /usr/bin/python3.6m::Unknown:/usr/bin/python3.6m, ~/sandbox/bin/python:sandbox:Venv:~/sandbox/bin/python
16:05:53.627 [debug] Refreshed Environments
16:05:53.899 [debug] ipykernel version & path 6.26.0, ~/.conda/envs/praxis_env/lib/python3.9/site-packages/ipykernel/__init__.py for ~/.conda/envs/praxis_env/bin/python
16:05:54.360 [info] Handle Execution of Cells 0 for ~/projects/Initial SLE dataset/Linear models SLE/Experiments/Check_files.ipynb
16:05:55.223 [debug] Kernel output: NOTE: When using the `ipython kernel` entry point, Ctrl-C will not work.

To exit, you will have to explicitly quit this process, by either sending
"quit" from a client, or using Ctrl-\ in UNIX-like environments.

To read more about this, see https://github.com/ipython/ipython/issues/2049


To connect another client to this kernel, use:
    --existing kernel-v2-41096mVL7SQryeeGd.json

16:05:55.403 [debug] Outgoing Socket Message: {"buffers":[],"channel":"shell","content":{},"header":{"date":"2023-11-14T22:05:55.402Z","msg_id":"4cee4e45-693f-4f7f-bd2d-0dbc726f0388","msg_type":"kernel_info_request","session":"1b6046d3-4697-4e4d-9aef-e68a97444077","username":"527017e7-9977-45cb-ac49-f47ac966ae54","version":"5.2"},"metadata":{},"parent_header":{}}
16:05:55.404 [debug] Waiting for Raw Session to be ready in postStartRawSession
16:05:55.404 [debug] Waiting for Raw session to be ready, status: connected
16:05:55.405 [debug] Raw session connected
16:05:55.405 [debug] Waiting for Raw session to be ready
16:05:55.406 [debug] Waited for Raw session to be ready & got status: connected
16:05:55.406 [debug] Successfully waited for Raw Session to be ready in postStartRawSession
16:05:55.406 [debug] Kernel status is 'unknown' before requesting kernel info and after ready
16:05:55.406 [debug] Sending request for kernelInfo
16:05:55.406 [debug] Outgoing Socket Message: {"buffers":[],"channel":"shell","content":{},"header":{"date":"2023-11-14T22:05:55.406Z","msg_id":"244d213f-0518-4169-9041-72cff258f18d","msg_type":"kernel_info_request","session":"1b6046d3-4697-4e4d-9aef-e68a97444077","username":"527017e7-9977-45cb-ac49-f47ac966ae54","version":"5.2"},"metadata":{},"parent_header":{}}
16:05:56.906 [debug] Did not get a response for requestKernelInfo
16:05:56.906 [debug] Sending request for kernelInfo
16:05:56.907 [debug] Outgoing Socket Message: {"buffers":[],"channel":"shell","content":{},"header":{"date":"2023-11-14T22:05:56.906Z","msg_id":"5cb3c458-f983-45f5-82a8-0a0cc6d4f31c","msg_type":"kernel_info_request","session":"1b6046d3-4697-4e4d-9aef-e68a97444077","username":"527017e7-9977-45cb-ac49-f47ac966ae54","version":"5.2"},"metadata":{},"parent_header":{}}
16:05:58.408 [debug] Did not get a response for requestKernelInfo
16:05:58.408 [warn] Didn't get response for requestKernelInfo after 3002ms.
16:05:58.415 [debug] Executing silently Code (unknown) = import sys as _VSCODE_sys\nprint(_VSCODE_sys.executable); del _VSCODE_sys
16:05:58.415 [debug] Outgoing Socket Message: {"buffers":[],"channel":"shell","content":{"silent":false,"store_history":false,"user_expressions":{},"allow_stdin":true,"stop_on_error":false,"code":"import sys as _VSCODE_sys\nprint(_VSCODE_sys.executable); del _VSCODE_sys"},"header":{"date":"2023-11-14T22:05:58.415Z","msg_id":"6bc37b23-89d2-4153-8cd2-5bb12f5c4f0a","msg_type":"execute_request","session":"1b6046d3-4697-4e4d-9aef-e68a97444077","username":"527017e7-9977-45cb-ac49-f47ac966ae54","version":"5.2"},"metadata":{},"parent_header":{}}
16:06:07.629 [info] End refreshing Kernel Picker (1699999547130)

Ok, I found out for v2023.11.1003200515 just a ‘Reload Window’ is enough to make the notebook run.

Sorry for those running into this issues Pleatsecan you followe the comments in this link anddownload this extension and try https://github.com/microsoft/vscode-jupyter/issues/14519#issuecomment-1778289425

I am out of office for the next few weeks so I won’t be able to try this fix for a while, sorry @DonJayamanne !