Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MATLAB kernal for vscode-jupyter #15788

Open
1 of 2 tasks
p1um3r opened this issue Jun 22, 2024 · 2 comments
Open
1 of 2 tasks

MATLAB kernal for vscode-jupyter #15788

p1um3r opened this issue Jun 22, 2024 · 2 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster

Comments

@p1um3r
Copy link

p1um3r commented Jun 22, 2024

Applies To

  • Notebooks (.ipynb files)
  • Interactive Window and/or Cell Scripts (.py files with #%% markers)

What happened?

I can't start the MATLAB kernal for vscode-jupyter.
However, I can start a jupyter notebook server first and then connect to the exsiting sever successfully.
I hope that someone could sovel my problem
1719045764574

VS Code Version

1.90.1

Jupyter Extension Version

v2024.5.0

Jupyter logs

16:46:10.801 [info] Starting Kernel (Python Path: ~\AppData\Local\Programs\Python\Python38\python.exe, Unknown, 3.8.10) for 'd:\~\MATLAB\test.ipynb' (disableUI=false)
16:46:10.885 [info] Launching Raw Kernel MATLAB Kernel # python3
16:46:10.892 [warn] Failed to get activated env vars for ~\AppData\Local\Programs\Python\Python38\python.exe in 6ms
16:46:10.961 [info] Process Execution: python3 -m jupyter_matlab_kernel -f c:\Users\~\AppData\Roaming\jupyter\runtime\kernel-v2-10456sZYT6dxreasj.json
    > cwd: d:\~\MATLAB
16:46:11.040 [error] Disposing kernel process due to an error Error: The kernel died. Error: ... View Jupyter [log](command:jupyter.viewOutput) for further details.
    > Kernel Id = .jvsc74a57bd0d737386cadcd4604dd2f91820450be9b8af88eb737c8003ede15abd8ab989e9b#jupyter_matlab_kernel.c:\Users\~\AppData\Local\Programs\Python\Python38\python.exe.\.python3#-m#jupyter_matlab_kernel#-f#{connection_file}
    > Interpreter Id = c:\USERS\~\APPDATA\LOCAL\PROGRAMS\PYTHON\PYTHON38\PYTHON.EXE
    > at ChildProcess.<anonymous> (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.5.0-win32-x64\dist\extension.node.js:309:44339)
    > stdErr = 
16:46:11.041 [error] 
16:46:11.043 [error] Failed to connect raw kernel session: Error: The kernel died. Error: ... View Jupyter [log](command:jupyter.viewOutput) for further details.
16:46:11.043 [error] Failed to connect raw kernel session: Error: The kernel died. Error: ... View Jupyter [log](command:jupyter.viewOutput) for further details.
16:46:11.043 [warn] Failed to shutdown kernel, .jvsc74a57bd0d737386cadcd4604dd2f91820450be9b8af88eb737c8003ede15abd8ab989e9b#jupyter_matlab_kernel.c:\Users\~\AppData\Local\Programs\Python\Python38\python.exe.\.python3#-m#jupyter_matlab_kernel#-f#{connection_file} [TypeError: Cannot read properties of undefined (reading 'dispose')
	at DT.shutdown (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.5.0-win32-x64\dist\extension.node.js:314:13629)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
	at async _T.shutdown (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.5.0-win32-x64\dist\extension.node.js:314:22107)]
16:46:11.044 [warn] Error occurred while trying to start the kernel, options.disableUI=false Error: The kernel died. Error: ... View Jupyter [log](command:jupyter.viewOutput) for further details.
    > Kernel Id = .jvsc74a57bd0d737386cadcd4604dd2f91820450be9b8af88eb737c8003ede15abd8ab989e9b#jupyter_matlab_kernel.c:\Users\~\AppData\Local\Programs\Python\Python38\python.exe.\.python3#-m#jupyter_matlab_kernel#-f#{connection_file}
    > Interpreter Id = c:\USERS\~\APPDATA\LOCAL\PROGRAMS\PYTHON\PYTHON38\PYTHON.EXE
    > at ChildProcess.<anonymous> (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.5.0-win32-x64\dist\extension.node.js:309:44339)
    > stdErr = 
16:46:11.044 [warn] Kernel Error, context = start Error: The kernel died. Error: ... View Jupyter [log](command:jupyter.viewOutput) for further details.
    > Kernel Id = .jvsc74a57bd0d737386cadcd4604dd2f91820450be9b8af88eb737c8003ede15abd8ab989e9b#jupyter_matlab_kernel.c:\Users\~\AppData\Local\Programs\Python\Python38\python.exe.\.python3#-m#jupyter_matlab_kernel#-f#{connection_file}
    > Interpreter Id = c:\USERS\~\APPDATA\LOCAL\PROGRAMS\PYTHON\PYTHON38\PYTHON.EXE
    > at ChildProcess.<anonymous> (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.5.0-win32-x64\dist\extension.node.js:309:44339)
    > stdErr = 
16:46:11.058 [warn] Failed to get activated env vars for ~\AppData\Local\Programs\Python\Python38\python.exe in 13ms
16:46:11.064 [info] Process Execution: ~\AppData\Local\Programs\Python\Python38\python.exe -c "import ipykernel;print('6af208d0-cb9c-427f-b937-ff563e17efdf')"
16:46:11.303 [info] Dispose Kernel 'd:\~\MATLAB\test.ipynb' associated with 'd:\~\MATLAB\test.ipynb'
16:46:11.305 [error] Error in execution Error: The kernel died. Error: ... View Jupyter [log](command:jupyter.viewOutput) for further details.
    > Kernel Id = .jvsc74a57bd0d737386cadcd4604dd2f91820450be9b8af88eb737c8003ede15abd8ab989e9b#jupyter_matlab_kernel.c:\Users\~\AppData\Local\Programs\Python\Python38\python.exe.\.python3#-m#jupyter_matlab_kernel#-f#{connection_file}
    > Interpreter Id = c:\USERS\~\APPDATA\LOCAL\PROGRAMS\PYTHON\PYTHON38\PYTHON.EXE
    > at ChildProcess.<anonymous> (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.5.0-win32-x64\dist\extension.node.js:309:44339)
    > stdErr = 
16:46:11.305 [error] Error in execution (get message for cell) Error: The kernel died. Error: ... View Jupyter [log](command:jupyter.viewOutput) for further details.
    > Kernel Id = .jvsc74a57bd0d737386cadcd4604dd2f91820450be9b8af88eb737c8003ede15abd8ab989e9b#jupyter_matlab_kernel.c:\Users\~\AppData\Local\Programs\Python\Python38\python.exe.\.python3#-m#jupyter_matlab_kernel#-f#{connection_file}
    > Interpreter Id = c:\USERS\~\APPDATA\LOCAL\PROGRAMS\PYTHON\PYTHON38\PYTHON.EXE
    > at ChildProcess.<anonymous> (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.5.0-win32-x64\dist\extension.node.js:309:44339)
    > stdErr = 
16:46:11.312 [info] Process Execution: ~\AppData\Local\Programs\Python\Python38\python.exe -c "import ipykernel;print('6af208d0-cb9c-427f-b937-ff563e17efdf')"

Coding Language and Runtime Version

No response

Language Extension Version (if applicable)

No response

Anaconda Version (if applicable)

No response

Running Jupyter locally or remotely?

None

@p1um3r p1um3r added the bug Issue identified by VS Code Team member as probable bug label Jun 22, 2024
@p1um3r
Copy link
Author

p1um3r commented Jun 22, 2024

associated add support for matlab

@DonJayamanne
Copy link
Contributor

@p1um3r Can you try installing matlab in a virtual environment and see if you still run into this same issue?
Also, please can you share the install steps for matlab (that you have used) on Windows

@DonJayamanne DonJayamanne added the info-needed Issue requires more information from poster label Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

2 participants