Hi folks! We’ve just released an update to the Kot...
# datascience
r
Hi folks! We’ve just released an update to the Kotlin kernel for Jupyter! Now it supports a proper completion and compilation errors detection on the fly. Just like in IDEA ;) More details here: https://blog.jetbrains.com/kotlin/2020/05/kotlin-kernel-for-jupyter-notebook-v0-8/
👍 18
j
@roman.belov how does one add thier data manipulation library to the kotlin-kernel-for-jupyter library preloads? hiding the classpath details seems to be a significant consideration in cmdline kotlinc
i see the prior PR's in kotlin-jupyter. I will test and submit similar
m
Hi, I am trying kotlin+jupyter for the first times and having issue with running krangl sample. I I am getting error
Failed to process '%use krangl' command. Unknown library 'krangl'
I can admit that I lack basic understanding e.g. how the lib can be installed. Playing around on Mac with conda.
Its working fine with
Copy code
@file:Repository(“<https://repo1.maven.org/maven2>”)
@file:DependsOn(“de.mpicbg.scicomp:krangl:0.11")
r
@Michal Harakal please try to restart the kernel. Will it help?
m
@roman.belov I have tried to switch it off and on and “magic” is still not working .
I still don’t understand who and how is responsible for the installation of libraries. I have seen “recipes” in libraries folder, but have no clue who and how should install/import them into my anaconda installation … https://github.com/Kotlin/kotlin-jupyter/tree/master/libraries
r
@Michal Harakal with Kotlin kernel you don’t need to install libraries locally. They are automatically downloaded by providing maven coordinates. It basically means that notebooks are kind of self-contained and all dependencies are described right in the text of the notebook. Syntax for this exactly like you’ve mentioned above:
Copy code
@file:Repository("<https://repo1.maven.org/maven2>")
@file:DependsOn("de.mpicbg.scicomp:krangl:0.11")
To simplify this boilerplate code for popular libraries we’ve added
%use
magics which work like short aliases for libraries. You may create such alias locally by adding a corresponding json file or even contribute it to our repository and it will be available for everyone. Also json file supports initializing code, conversions of the results and some other handy feature. It’s really strange that
%use
magics don’t work for you, I have no idea what could happen. @Anatoly Nikitin probably you can advice here?
👍 1
i
@Michal Harakal Does the problem with
%use
persist? If yes, could you please share the log which kernel produces when you execute the cell with %use? It might be very helpful.
m
@Ilya Muradyan
%use
yes still doesn’t work, I have posted logs via DM
i
I reproduced the problem, trying to fix it now
@Michal Harakal Seems to be fixed. Hopelessly, kernel update is needed. Please, update to the latest version
0.8.0.25
👍 1
m
I can confirm that update fixes the problem. Thank you very much @Ilya Muradyan
👍 1
i
Thanks for reporting!
j
@roman.belov does this @ and %use bring in transitive deps ?
r
yes, they do
x
How to set a http proxy for it (%use xxx) ?
m
On my on linux and mac machines with anaconda by following readme on the github page it worked out of the box like a charm. https://github.com/Kotlin/kotlin-jupyter I was also thinking about dockerizing, but I hav just started with DS, so I have to get python version running first. @Marian Schubert do you have a particular jupyter docker image on mind ?wich could be taken as base for extending with kotlin?
a
Just install it with anaconda and play away. If you do not have it and don't want to install it, you can use an image with anaconda and install an environment in a user space.
m
Oh, so I just run (on my clean system without jyputer)
conda install kotlin-jupyter-kernel -c jetbrains
and I'll get working Jupyter Notebooks with Kotlin kernel? I'll try that out
a
yes, it works out of the box if you have installed anaconda
c
conda is great - you can also just use pip to install