Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameterization of options for jupyter kernelspec install in installkernel() #716

Closed

Conversation

setempler
Copy link

Hi,

I had the problem to not be able to apply IJulia.installspec correctly for a configuration,
where a jupyter notebook server was installed in a python virtual environment (venv).

With python, it is possible to register a kernel installed in a venv into a server
that is also installed in a (different) venv. Key is to use the --prefix argument, such as in:

### bash

# install server in a python venv
export tmpd=$HOME/tmp/ijulia
mkdir -p $tmpd
python3 -m venv $tmpd # 3.7.0
source $tmpd/bin/activate
pip install jupyter
deactivate

# install a python kernel venv
python3 -m venv $tmpd/kernelenv
source $tmpd/kernelenv/bin/activate
pip install ipykernel
python -m ipykernel install \
    --name virtual_python \
    --prefix="$tmpd" \
    --display-name "Virtual Python"
deactivate

# verify
source $tmpd/bin/activate
jupyter kernelspec list
deactivate

So I request a pull for a change to allow customisation of the arguments
forwarded to jupyter kernelspec install to allow registering a Julia kernel
from IJulia.installspec to a server installed in a venv.

### julia

# install
envd = ENV["HOME"] * "/tmp/ijulia"
using IJulia
IJulia.installkernel("Virtual Julia", jupyter_options = ["--prefix='$envd'"])
### bash

# verify
source $tmpd/bin/activate
jupyter kernelspec list
deactivate

System:

  • macOS 10.13.6
  • bash 4.4.23
  • python 3.7.0

@setempler
Copy link
Author

I found

LoadError: function cat does not accept keyword arguments
while loading /home/travis/.julia/v0.6/IJulia/deps/build.jl, in expression starting on line 125

at travis - is this (compatibility to 0.6) an issue?

@setempler
Copy link
Author

Closing due to extended version in #719

@setempler setempler closed this Aug 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant