Skip to content

Instantly share code, notes, and snippets.

@shadaj
Last active January 18, 2024 13:29
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save shadaj/323ad2393b46c1b71df435728a052c24 to your computer and use it in GitHub Desktop.
Save shadaj/323ad2393b46c1b71df435728a052c24 to your computer and use it in GitHub Desktop.
Install Scala in Colab.ipynb
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@BilalKacel
Copy link

Hello Shadaj,
I hope you're well.
I would like to know if the installation procedure of the Scala kernel is still functional?
From Colab, there is no error when I run the Scala Kernel installation.
But, unfortunately, just running the "Hello World !" print does not work ...
Do you have any advice ?

Thank you.
Cheers,

@cedricmjohn
Copy link

Same as BilalKacel: the install seems to work, but the kernel does not load Scala. Tried to reload the page and restart the kernel but did not work for me.

@tensorvijay
Copy link

I would strongly encourage this to be resolved

@MielHostens
Copy link

This was possible earlier, but indeed fails now

@shadaj
Copy link
Author

shadaj commented Nov 28, 2020

Hmm, this is surprising. I just used the same initialization code for a couple other notebooks in the past week and it seemed to work fine. Perhaps the notebook needs to be set to the Scala kernel like in https://gist.github.com/shadaj/29d77180aeefc41a749273026f7d1fd9 to work?

@MielHostens
Copy link

MielHostens commented Nov 28, 2020 via email

@Platinum-Dragon
Copy link

This is so disappointing. I can whip together and train a deep learning model in Python / keras in a matter of minutes, but I can't find anything comparable for Scala :-(

@kirisakow
Copy link

kirisakow commented Feb 27, 2023

There is actually an important prerequisite to assure before you follow steps given by @shadaj: If you open a notebook with a text editor and compare the raw contents of a regular Notebook with that of a Shadaj's notebook, you'll see one crucial difference that you need to fix. So,

  1. You need to open your Colab Notebook with a text editor (use any of the relevant Google Drive apps) and make sure the kernelspec.name key is set to work with Scala, like so:
{
  
  "kernelspec": {
    "display_name": "Scala",
    "name": "scala"
  }
  
}

(This is a necessary step for any non-pythonic kernel — be it Scala, Go or whatnot. Check my notebooks for examples: https://gist.github.com/kirisakow)

  1. Save, close.

  2. Now open normally with Google Colab engine and start working.

@Platinum-Dragon
Copy link

Platinum-Dragon commented Mar 1, 2023 via email

@kirisakow
Copy link

kirisakow commented Mar 1, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment