tweag / HaskellR

The full power of R in Haskell.

Home Page:https://tweag.github.io/HaskellR

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to use non-base libraries with IHaskell/Jupyter

skeydan opened this issue · comments

Hi,
sorry it's me again, this time it's a super stupid question I'm sure, but how can use e.g. Text.CSV in Jupyter notebook?
I start Jupyter like this (from some project directory)

stack --stack-yaml=/home/key/code/haskell/HaskellR/stack.yaml --nix exec jupyter notebook

but then, how/where can I tell stack which libraries I'll need in my notebook?

Sorry for asking such a basic question ...
Thanks,
Sigrid

I don't have time to check right this second but perhaps try

stack --stack-yaml=/home/key/code/haskell/HaskellR/stack.yaml --nix --package csv exec -- jupyter notebook

That is, stack exec takes --package flag.

Hi, thanks for the quick answer, but stack doesn't take a package argument...

[key@key haskellR_intro]$ stack --stack-yaml=/home/key/code/haskell/HaskellR/stack.yaml --nix --package csv exec -- jupyter notebook
Invalid option `--package'

oops, try this way instead

stack --stack-yaml=/home/key/code/haskell/HaskellR/stack.yaml --nix exec --package csv -- jupyter notebook

The argument should have been to exec, not to stack

Wonderful, thank you so much!!!