korniichuk / rk

The remote Jupyter kernel/kernels administration utility
http://www.korniichuk.com
The Unlicense
54 stars 18 forks source link

Bug in the rk: A superuser (root) privileges required for the user kernels location ~/.ipython/kernels #2

Closed zonca closed 9 years ago

zonca commented 9 years ago

wouldn't it be possible to save kernelspecs in ~/.ipython/kernels?

korniichuk commented 9 years ago

The default kernels location in the rk: /usr/local/share/jupyter/kernels. Change the default kernels location: $ sudo gedit /usr/local/lib/python2.7/dist-packages/rk/config/rk.ini.

rk.ini:

config_argparse_rel_path = "config/argparse.txt"
config_kernels_rel_path = "config/kernels.json"
config_messages_rel_path = "config/messages.txt"
connection_file = "{connection_file}"
display_name = "Template"
img_location = "resources/img"
interpreter = "python"
kernel_name = "template"
kernels_location = "/usr/local/share/jupyter/kernels"
language = "python"
logo_name_srt = "logo-{0}x{0}.png"
remote_host = "remote_username@remote_host"
rk_log_location = "/tmp/rk/log"
script = "rkscript"

And thanks, we must change code, because superuser (root) privileges also required for ~/.ipython/kernels dir o.O.

korniichuk commented 9 years ago

Fixed bug in the rk: a superuser (root) privileges required for the user kernels location ~/.ipython/kernels. Added new section Kernels location to README: https://github.com/korniichuk/rk#kernels-location

dereneaton commented 8 years ago

Might be worth mentioning in the docs that the rk.ini file can end up here: anaconda/lib/python2.7/site-packages/rk/config/rk.ini if using a conda-installed pip, and it doesn't require superuser privileges to change. For me kernel.json ended up here: .ipython/kernels/template/kernel.json.

Once I figured that out everything went smoothly!

Phyks commented 8 years ago

Would not it be worth it setting kernels in local folder if root access is not provided? Sounds like a better default config to me.