JupyterLab + SoS Suite setup
Install miniconda3 the Python development environment
We recommend using
anaconda and customize your installation as needed after install this minimal version of
To install please follow instructions on this page. Please go for
After you successfully installed the latest version of
miniconda3, please follow prompts below to setup
a JupyterLab + SoS Suite environment for daily computing.
Note: maybe you already have a version of
miniconda on your computer. If you are very familiar with
conda then please try to work with your existing version by either upgrading or create separate
env under it to install additional packages. You might also want to start afresh and retire your older version (but keep the installation around for a while just in case). To do so, find in your
~/.bash_profile a line like this:
that actually points to the folder you installed your
anaconda3 or earlier version of
miniconda3. You can remove this line and restart your bash terminal to enable the setting.
Alternatively, a simpler but less elegant approach is to rename your
anaconda3 folder to, say
pip for package installation
miniconda there are two ways to install Python packages: either using
conda install or
I wouldn’t discuss too much details on what each does and pros and cons. I’d just say that 1) it is recommended to consistently use either
pip and not a combination of them, and 2) I recommend using
Jupyter Notebook and kernels
pip install in commands below generates timeout errors, you can perhaps try a different mirror, depending on your location. For example mirros in mainland China, e.g.,
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple ..., may help. You can also configure
pypi to use alternative mirrors by default.
pip install notebook jupyterlab jupyter_contrib_nbextensions
pip install bash_kernel --no-cache-dir python -m bash_kernel.install
pip install markdown-kernel --no-cache-dir python -m markdown_kernel.install
To install R kernel for Jupyter after you installed R,
R --slave -e "IRkernel::installspec()"
If you get a complaint that
IRkernel package is not available, please install it in R, eg
install.packages('IRkernel'), before you run the command above.
A ipynb to docx converter
This will allow you to save
ipynb file to a
docx file for various purposes
pip install jupyter-docx-bundler --no-cache-dir jupyter bundlerextension enable --py jupyter_docx_bundler --sys-prefix
nbdime to work with git
This will override the default
git diff and display better the changes to IPython notebooks
pip install nbdime nbdime config-git --enable --global
pip install docker markdown wand graphviz imageio pillow nbformat feather-format --no-cache-dir pip install sos sos-notebook sos-r sos-python sos-bash -U --no-cache-dir python -m sos_notebook.install jupyter labextension install transient-display-data jupyter labextension install @jupyterlab/toc jupyter labextension install jupyterlab-sos
If the last command fails and complains about missing
nodejs you can use
conda to install it,
conda install -c conda-forge nodejs
On MacOS you can also visit https://nodejs.org and download their
pkg installer, install it then rerun the
jupyter labextension commands.
We use Docker a lot running various software that are hard to install. SoS also provides an interface to run Docker images.
To install Docker on Linux,
- Run commands below:
curl -fsSL get.docker.com -o get-docker.sh sudo sh get-docker.sh sudo usermod -aG docker $USER
- Log out and log back in (no need to reboot computer)
To install it on MacOS, visit https://www.docker.com/products/docker-desktop and download & install the Docker Desktop installer.