https://github.com/nushell/nu_jupyter
An experimental juptyer notebook kernel for Nushell
https://github.com/nushell/nu_jupyter
Last synced: 10 months ago
JSON representation
An experimental juptyer notebook kernel for Nushell
- Host: GitHub
- URL: https://github.com/nushell/nu_jupyter
- Owner: nushell
- License: mit
- Created: 2020-03-15T02:09:32.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2020-07-05T20:09:18.000Z (over 5 years ago)
- Last Synced: 2025-03-29T07:22:41.625Z (11 months ago)
- Language: Jupyter Notebook
- Size: 106 KB
- Stars: 24
- Watchers: 12
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Jupyter Notebook support for Nushell

This is a very(!) experimental kernel for Jupyter for running Nushell. It currently requires 0.11.1 or later.
To install and run the kernel:
```
> cd nu_jupyter
nu_jupyter> jupyter kernelspec install ../nu_jupyter --user
nu_jupyter> jupyter lab
```
Limitations:
* State is not kept between runs. This is something that will change in future versions.
## How to create the python egg
This step is only needed if you've made changes to the nushell kernelspec.
### Creating the python egg
To create the egg file do the following:
```
> cd nu_jupyter
nu_jupyter> python.exe setup.py bdist_egg
```
This creates an egg file in the `dist` folder that pipenv can utilize.
## Installing using pipenv
From within your pipenv environment folder, mine is called `me/jup`.
```
jup> pipenv install -e git+https://github.com/nushell/nu_jupyter.git#egg=dist
```
This should add the nu_jupyter kernelspec and insert entries in your pipfile and pipfile.lock file.
## Running with pipenv
From within your pipenv env folder, mine is called `/me/jup`.
```
# To activate your pipenv environment, run
jup> pipenv shell
# To add the new jupyter kernel
jup> jupyter kernelspec install ../nu_jupyter --user
# To launch jupyter lab, run
jup> jupyter lab
```
After launching you should have jupyter lab looking similar to this.

The last thing is to ensure that NuShell is somewhere in your path. Jupyter requires access to it in order to run the commands in the notebook.