Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Debian - Install Jupyter and Scala kernel on Debian Stretch
#!/bin/bash
## NOTE: This script is deprecated!
## See: https://github.com/frgomes/bash-scripts/blob/master/user-install/install-jupyter.sh
###################################################################################
# Requirements: python3, pip3 and curl
#
# You may be probably interested on creating an isolated Python3 environment.
# A quick recipe would be:
# $ sudo apt-get install python3-minimal curl virtualenv virtualenvwrapper
# $ mkvirtualenv -p /usr/bin/python3 myenv
# $ workon myenv
# $ ./install-jupyter.sh
# $ jupyter notebook
###################################################################################
function install_jupyter_core {
pip3 install --upgrade jupyter
}
function install_jupyter_coursier {
pushd /usr/local/bin
[[ ! -e coursier ]] && \
sudo curl -L -o coursier https://git.io/vgvpD && \
sudo chmod 755 coursier && pwd && ./coursier --help
popd
}
function install_jupyter_kernel_scala {
pushd /tmp
curl -L -o jupyter-scala https://raw.githubusercontent.com/alexarchambault/jupyter-scala/master/jupyter-scala \
&& chmod +x jupyter-scala \
&& ./jupyter-scala --force
popd
}
install_jupyter_core \
&& install_jupyter_coursier \
&& install_jupyter_kernel_scala \
&& hash -r; jupyter kernelspec list
@frgomes

This comment has been minimized.

Copy link
Owner Author

@frgomes frgomes commented Nov 21, 2015

This script works just fine on Debian Jessie, Kubuntu 15.04 and Kubuntu 15.10.
Chances are that the very same script just works on Ubuntu and other Debian derivatives.

@charles-plessy

This comment has been minimized.

Copy link

@charles-plessy charles-plessy commented Dec 16, 2015

Thanks for this Gist ! On a minimal Jessie system, I also needed sudo apt install libzmq3-dev -y.

@frgomes

This comment has been minimized.

Copy link
Owner Author

@frgomes frgomes commented Jul 4, 2016

Seems like it's much easier now to install Jupyter with the most recent Jupyter Scala kernel.
I still need to do that in a blank Debian Jessie installation... but supposedly... these commands below should suffice:

$ pip install --upgrade jupyter

$ if [ ! -d ~/tmp ] ;then mkdir ~/tmp; fi && cd ~/tmp && \
     curl -L -o jupyter-scala https://git.io/vrHhi && \
       chmod +x jupyter-scala && ./jupyter-scala --force && \
         rm -f jupyter-scala

$ if [ ! -d ~/Documents/jupyter-notebooks ] ;then mkdir ~/Documents/jupyter-notebooks ;fi && cd ~/Documents/jupyter-notebooks
$ jupyter notebook
@jrouquie

This comment has been minimized.

Copy link

@jrouquie jrouquie commented Nov 30, 2016

One might need
sudo apt install python3-setuptools

@frgomes

This comment has been minimized.

Copy link
Owner Author

@frgomes frgomes commented Sep 20, 2017

@charles-plessy @jrouquie:
I've updated this gist with a completely new way of installing Jupyter and a Scala kernel.
I have not tested on a clean Debian installation. However, I believe that the comments on the top should suffice.

For my full list of Bash incantations:
https://github.com/frgomes/debian-bin
https://github.com/frgomes/debian-scripts

@frgomes

This comment has been minimized.

Copy link
Owner Author

@frgomes frgomes commented Apr 27, 2019

@charles-plessy @jrouquie
Projects debian-bin and debian-scripts (as above) were consolidated into a single project
http://github.com/frgomes/bash-scripts
See the new installation script at
https://github.com/frgomes/bash-scripts/blob/master/user-install/install-jupyter.sh

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