ARTICLE AD BOX
I am trying to use a bash kernel in jupyter notebooks and am receiving the following error:
Connection failed
A connection to the notebook server could not be established. The notebook will continue trying to reconnect. Check your network connection or notebook server configuration.
I have tried the following workflow.
From python command prompt:
conda create --name bash_env --clone arcgispro-py3 conda install -c conda-forge bash_kernel python -m bash_kernel.installHowever, no matter what I try, I get a not connected error.
I'm on Windows 11.
jupyter kernelspec list returns:
.net-csharp C:\Users\myusername\AppData\Roaming\jupyter\kernels\.net-csharp .net-fsharp C:\Users\myusername\AppData\Roaming\jupyter\kernels\.net-fsharp .net-powershell C:\Users\myusername\AppData\Roaming\jupyter\kernels\.net-powershell bash C:\Users\myusername\AppData\Roaming\jupyter\kernels\bash javascript C:\Users\myusername\AppData\Roaming\jupyter\kernels\javascript python3 C:\Users\myusername\AppData\Local\ESRI\conda\envs\bash_env\share\jupyter\kernels\python3kernel.json within the above bash location reads:
{"argv": ["C:\\Users\\myusername\\AppData\\Local\\ESRI\\conda\\envs\\bash_env\\python.exe", "-m", "bash_kernel", "-f", "{connection_file}"], "codemirror_mode": "shell", "display_name": "Bash", "env": {"PS1": "$"}, "language": "bash"}(Note: I have tried multiple alterations to kernel.json, including pointing to bash.exe, none of which have worked). I've also deleted that entire bash directory so that it reads it from the bash_env and it still didn't work.
I have Git Bash downloaded and
where bashrun from Git Bash returns:
C:\Program Files\Git\usr\bin\bash.exe C:\Windows\System32\bash.exemy bash_env python environment has:
jupyter_server 1.21.0 ipykernel 6.16.0 ipykernel 6.16.0 ipython 7.34.0I have already tried to delete cookies.
The traceback within python command prompt is too long to paste, but here's a portion:
AttributeError: module 'pexpect' has no attribute 'spawn' [I 14:19:58.810 NotebookApp] KernelRestarter: restarting kernel (1/5), new random ports 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. Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code