requires the ipykernel package
Memie1 opened this issue · 9 comments
Environment data
- VS Code version: 1.94.2
- Jupyter Extension version (available under the Extensions sidebar): v2024.9.1 (tried various versions)
- Python Extension version (available under the Extensions sidebar): 3.9.13 (tried various versions)
- OS (Windows | Mac | Linux distro) and version: Windows
- Python and/or Anaconda version: 3.9.13 (tried various versions)
- Type of virtual environment used (N/A | venv | virtualenv | conda | ...): venv
- Jupyter server running: Local | Remote | N/A
Expected behaviour
The python kernel to work. I've ran pip force install like it asks
Actual behaviour
Running cells with 'Python 3.9.13' requires the ipykernel package.
Run the following command to install 'ipykernel' into the Python environment.
Command: 'c:/Users/{user}/AppData/Local/Microsoft/WindowsApps/python3.9.exe -m pip install ipykernel -U --user --force-reinstall'
I have tried it with a non microsoft store version of python too.
Steps to reproduce:
[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]
- The code doesn't matter, the fact is that the kernel isn't working no matter what i do. I have reinstalled everything so many times, including libraries, python, jupyter extension. I'm very confused. If i knew a way to recreate this, i would.
Logs
Output for Jupyter
in the Output
panel (View
→Output
, change the drop-down the upper-right of the Output
panel to Jupyter
)
00:32:22.425 [error] Error in execution (get message for cell) Error: The kernel died. Error: C:\Users\~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe: No module named ipykernel_launcher... View Jupyter [log](command:jupyter.viewOutput) for further details.
> Kernel Id = .jvsc74a57bd0dfe038eecb874360894ce776203bb4915e5178ab37b222d416b3884fedf0d40a.c:\Users\~\AppData\Local\Microsoft\WindowsApps\python3.9.exe.c:\Users\~\AppData\Local\Microsoft\WindowsApps\python3.9.exe.-m#ipykernel_launcher
> Interpreter Id = c:\USERS\~\APPDATA\LOCAL\MICROSOFT\WINDOWSAPPS\PYTHON3.9.EXE
> at ChildProcess.<anonymous> (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.9.1-win32-x64\dist\extension.node.js:299:44598)
> stdErr = C:\Users\~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe: No module named ipykernel_launcher
00:32:22.437 [info] Process Execution: ~\AppData\Local\Microsoft\WindowsApps\python3.9.exe -c "import ipykernel;print('6af208d0-cb9c-427f-b937-ff563e17efdf')"
Thank you for filing this issue and sorry you are running into this.
Please could you enable logging as follows:
- Open settings & go into
Jupyter->Logging
- Change the value to
trace
- Reload VS Code,
- Attempt to repro the issue & then copy the output from the
Jupyter
output panel (use the commandJupyter: Show Output
to get to the logs).
I think i did it correctly.
Does this give more info? I have tried a few more things to get it working this afternoon but no progress. I'm thinking this may be a problem with visual studio. I also recently tried changing the version of pylance I'm using but i don't think that did anything.
19:27:01.292 [error] Error in execution (get message for cell) Ll [Error]: The kernel died. Error: C:\Users~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe: No module named ipykernel_launcher... View Jupyter log for further details.
at ChildProcess. (c:\Users~.vscode\extensions\ms-toolsai.jupyter-2024.9.1-win32-x64\dist\extension.node.js:299:44598)
at ChildProcess.emit (node:events:531:35)
at Process.ChildProcess._handle.onexit (node:internal/child_process:294:12) {
category: 'kerneldied',
isJupyterError: true,
kernelConnectionMetadata: n {
kind: 'startUsingPythonInterpreter',
kernelSpec: id {
specFile: 'c:\Users\\AppData\Roaming\Code\User\globalStorage\ms-toolsai.jupyter\version-2024.9.1\jupyter\kernels\python3913jvsc74a57bd0dfe038eecb874360894ce776203bb4915e5178ab37b222d416b3884fedf0d40a\kernel.json',\AppData\Local\Microsoft\WindowsApps\python3.9.exe',
interpreterPath: 'c:\Users\
isRegisteredByVSC: 'registeredByNewVersionOfExt',
name: 'python3913jvsc74a57bd0dfe038eecb874360894ce776203bb4915e5178ab37b222d416b3884fedf0d40a',
argv: [Array],
language: 'python',
executable: 'python',
display_name: 'Python 3',
metadata: [Object],
env: {},
interrupt_mode: undefined
},
interpreter: {
id: 'C:\USERS\\APPDATA\LOCAL\MICROSOFT\WINDOWSAPPS\PYTHON3.9.EXE',\AppData\Local\Microsoft\WindowsApps\python3.9.exe.c:\Users\
uri: [ta]
},
id: '.jvsc74a57bd0dfe038eecb874360894ce776203bb4915e5178ab37b222d416b3884fedf0d40a.c:\Users\\AppData\Local\Microsoft\WindowsApps\python3.9.exe.-m#ipykernel_launcher'\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe: No module named ipykernel_launcher\r\n'
},
exitCode: 1,
stdErr: 'C:\Users\
}
19:27:01.306 [info] Process Execution: \AppData\Local\Microsoft\WindowsApps\python3.9.exe -c "import ipykernel;print('6af208d0-cb9c-427f-b937-ff563e17efdf')"\AppData\Local\Microsoft\WindowsApps\python3.9.exe.c:\Users\~\AppData\Local\Microsoft\WindowsApps\python3.9.exe.-m#ipykernel_launcher", Arg 2: undefined, Arg 3: true, Return Value: true
19:27:01.621 [debug] Checking if product is installed, Class name = Ux, completed in 327ms, has a truthy return value, Arg 1: 19, Arg 2: undefined, Return Value: true
19:27:01.621 [debug] Are Dependencies Installed, Class name = zd, completed in 327ms, has a truthy return value, Arg 1: "
19:27:01.636 [trace] Cell 2 completed in 0s (start: undefined, end: undefined)
Tried with python 3.12.7 too just now. It's still saying there it can't find ipykernel. I've checked the file (screenshot below), i see a lot relating to jupyter so i think it installed correctly. I've even forced the install of ipykernal before sending this just now and nothing changed.
19:30:01.939 [error] Error in execution (get message for cell) Ll [Error]: The kernel died. Error: C:\Users~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\python.exe: No module named ipykernel_launcher... View Jupyter log for further details.
at ChildProcess. (c:\Users~.vscode\extensions\ms-toolsai.jupyter-2024.9.1-win32-x64\dist\extension.node.js:299:44598)
at ChildProcess.emit (node:events:531:35)
at Process.ChildProcess._handle.onexit (node:internal/child_process:294:12) {
category: 'kerneldied',
isJupyterError: true,
kernelConnectionMetadata: n {
kind: 'startUsingPythonInterpreter',
kernelSpec: id {
specFile: 'c:\Users\\AppData\Roaming\Code\User\globalStorage\ms-toolsai.jupyter\version-2024.9.1\jupyter\kernels\python3127jvsc74a57bd0559d8e864d10a8296c885f7a84e1edb640b424062f06a1fd2a0ea1a7c9f72ab9\kernel.json',\AppData\Local\Microsoft\WindowsApps\python3.12.exe',
interpreterPath: 'c:\Users\
isRegisteredByVSC: 'registeredByNewVersionOfExt',
name: 'python3127jvsc74a57bd0559d8e864d10a8296c885f7a84e1edb640b424062f06a1fd2a0ea1a7c9f72ab9',
argv: [Array],
language: 'python',
executable: 'python',
display_name: 'Python 3',
metadata: [Object],
env: {},
interrupt_mode: undefined
},
interpreter: {
id: 'C:\USERS\\APPDATA\LOCAL\MICROSOFT\WINDOWSAPPS\PYTHON3.12.EXE',\AppData\Local\Microsoft\WindowsApps\python3.12.exe.c:\Users\
uri: [ta]
},
id: '.jvsc74a57bd0559d8e864d10a8296c885f7a84e1edb640b424062f06a1fd2a0ea1a7c9f72ab9.c:\Users\\AppData\Local\Microsoft\WindowsApps\python3.12.exe.-m#ipykernel_launcher'\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\python.exe: No module named ipykernel_launcher\r\n'
},
exitCode: 1,
stdErr: 'C:\Users\
}
19:30:01.980 [info] Process Execution: \AppData\Local\Microsoft\WindowsApps\python3.12.exe -c "import ipykernel;print('6af208d0-cb9c-427f-b937-ff563e17efdf')"\AppData\Local\Microsoft\WindowsApps\python3.12.exe.c:\Users\~\AppData\Local\Microsoft\WindowsApps\python3.12.exe.-m#ipykernel_launcher", Arg 2: undefined, Arg 3: true, Return Value: true
19:30:02.296 [debug] Checking if product is installed, Class name = Ux, completed in 356ms, has a truthy return value, Arg 1: 19, Arg 2: undefined, Return Value: true
19:30:02.297 [debug] Are Dependencies Installed, Class name = zd, completed in 357ms, has a truthy return value, Arg 1: "
19:30:02.315 [trace] Cell 2 completed in 0s (start: undefined, end: undefined)