vors / jupyter-powershell

PowerShell language kernel for Jupyter
MIT License
132 stars 26 forks source link

Cannot find the file specified, Kernel died #11

Closed vinayak-kaniyarakkal closed 4 years ago

vinayak-kaniyarakkal commented 5 years ago

In the console The system cannot find the file specified In the browser The kernel appears to have died. It will restart automatically.

Content of ~/AppData/Roaming/jupyter/kernels/powershell/kernel.json

{ "argv": [ "C:\\archive2\\Vinayak\\rnd\\platform\\anaconda\\python.exe", "-m", "powershell_kernel", "-f", "{connection_file}" ], "display_name": "PowerShell", "env": {"powershell_command": "pwsh"}, "language": "powershell" }

Full traceback in console.

Traceback (most recent call last): File "C:\archive2\Vinayak\rnd\platform\anaconda\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "C:\archive2\Vinayak\rnd\platform\anaconda\lib\runpy.py", line 85, in run_code exec(code, run_globals) File "C:\archive2\Vinayak\rnd\platform\anaconda\lib\site-packages\powershell_kernel_main.py", line 3, in IPKernelApp.launch_instance(kernel_class=PowerShellKernel) File "C:\archive2\Vinayak\rnd\platform\anaconda\lib\site-packages\traitlets\config\application.py", line 657, in launch_instance app.initialize(argv) File "", line 2, in initialize File "C:\archive2\Vinayak\rnd\platform\anaconda\lib\site-packages\traitlets\config\application.py", line 87, in catch_config_error return method(app, *args, *kwargs) File "C:\archive2\Vinayak\rnd\platform\anaconda\lib\site-packages\ipykernel\kernelapp.py", line 454, in initialize self.init_kernel() File "C:\archive2\Vinayak\rnd\platform\anaconda\lib\site-packages\ipykernel\kernelapp.py", line 365, in init_kernel user_ns=self.user_ns, File "C:\archive2\Vinayak\rnd\platform\anaconda\lib\site-packages\traitlets\config\configurable.py", line 412, in instance inst = cls(args, **kwargs) File "C:\archive2\Vinayak\rnd\platform\anaconda\lib\site-packages\powershell_kernel\kernel.py", line 50, in init repl = subprocess_repl.SubprocessRepl([powershell_command, '-noprofile', '-File', '-']) File "C:\archive2\Vinayak\rnd\platform\anaconda\lib\site-packages\powershell_kernel\subprocess_repl.py", line 29, in init stderr=subprocess.STDOUT, stdin=subprocess.PIPE, stdout=subprocess.PIPE) File "C:\archive2\Vinayak\rnd\platform\anaconda\lib\subprocess.py", line 707, in init restore_signals, start_new_session) File "C:\archive2\Vinayak\rnd\platform\anaconda\lib\subprocess.py", line 990, in _execute_child startupinfo) FileNotFoundError: [WinError 2] The system cannot find the file specified [I 14:30:56.125 NotebookApp] KernelRestarter: restarting kernel (1/5) WARNING:root:kernel 334f9cf8-1836-4623-bf40-a25fb4ecc6a2 restarted

vors commented 5 years ago

Looks like it cannot find pwsh. If you are trying to use it with powershell core, you should install it first https://github.com/PowerShell/PowerShell/releases

If you want to use it with windows powershell (the one that ships by default in windows), don't override it with --powershell-command pwsh.