Skip to content

Commit

Permalink
Doc: add instructions to install Jupyter kernel
Browse files Browse the repository at this point in the history
  • Loading branch information
certik committed Apr 7, 2021
1 parent 737fc41 commit 30ba9f8
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions doc/src/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,39 @@ Run an interactive prompt:
./src/bin/lfortran
```

## Enabling the Jupyter Kernel

To install the Jupyter kernel, install the following Conda packages also:
```
conda install xeus xtl nlohmann_json cppzmq
```
and enable the kernel by `-DWITH_XEUS=yes` and install into `$CONDA_PREFIX`. For
example:
```
cmake \
-DCMAKE_BUILD_TYPE=Debug \
-DWITH_LLVM=yes \
-DWITH_XEUS=yes \
-DCMAKE_PREFIX_PATH="$CONDA_PREFIX" \
-DCMAKE_INSTALL_PREFIX="$CONDA_PREFIX" \
.
cmake --build . -j4 --target install
```
To use it, install Jupyter (`conda install jupyter`) and test that the LFortran
kernel was found:
```
jupyter kernelspec list --json
```
Then launch a Jupyter notebook as follows:
```
jupyter notebook
```
Click `New->Fortran`. To launch a terminal jupyter LFortran console:
```
jupyter console --kernel=fortran
```


## Build From Git with Nix

One of the ways to ensure exact environment and dependencies is with `nix`. This will ensure that system dependencies do not interfere with the development environment. If you want, you can report bugs in a `nix-shell` environment to make it easier for others to reproduce.
Expand Down

0 comments on commit 30ba9f8

Please sign in to comment.