Skip to content

Instantly share code, notes, and snippets.

@osamashiraz
Created February 28, 2019 05:55
Show Gist options
  • Save osamashiraz/a18647716b9d3d62fad8a39f37fe39f8 to your computer and use it in GitHub Desktop.
Save osamashiraz/a18647716b9d3d62fad8a39f37fe39f8 to your computer and use it in GitHub Desktop.
Running Jupyter bash kernel on Windows 10 (Using WSL)
1. Install Anaconda on Windows 10
2. Get jupyter notebook and install bash kernel from here: https://github.com/takluyver/bash_kernel, make sure to run "python -m bash_kernel.install"
3. Install WSL and install pip3.
5. Using pip3 install python3, ipython3 and bash_kernel in WSL (follow same link as above for the bash kernel installation, make sure to run "python -m bash_kernel.install")
6. Make sure when you run "python3 -m bash_kernel" on WSL it shows a message saying:
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-9491.json
7. Next go to windows 10 explorer to this path: C:\Users\<ENTER YOUR USER NAME>\AppData\Roaming\jupyter\kernels\bash
8. Here you will find a file named kernel.json. Modify it to this:
{
"display_name": "Bash",
"language": "bash",
"argv": [
"c:\\Windows\\System32\\bash.exe", "-c",
"python3 -m bash_kernel -f \"`wslpath \"{connection_file}\"`\""
]
}
Many thanks to andyneff in this {https://github.com/takluyver/bash_kernel/issues/62} thread for the idea!
Cheers!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment