Before a notebook server is launched,
some modules get loaded by default.
In addition to these default modules,
you can load your own modules,
and export custom environment variables
in a file called
.jhubrc in your home directory.
All commands in the
.jhubrc are executed before your notebook server is launched.
to create a notebook using the MATLAB kernel,
you will need the following lines in your
module load matlab/2015a zeromq/4.1.5 export MATLAB_EXECUTABLE=$MATLAB/bin/matlab
Note that the only commands that will have any effect are
export commands. The
.jhubrc affects only the kernel environments (i.e., the environments of your notebooks), and not the terminal environment.
The terminal environment can be customized using
The default Jupyter environment supports Python and R kernels which are pre-loaded with several common packages for scientific computing and data analysis. It's also easy to install your own packages/libraries for use with these kernels.
We recommend using either pip or Conda to install Python packages whenever possible. You can install most Python package using the terminal with the following commands:
$ module add anaconda3/2.5.0 $ pip install <package_name> --user
This will make the package available to the Python 3 kernels.
For R packages, you can define the
R_LIBS environment variable in your
.jhubrc to specify where libraries get installed and loaded by notebooks.
In addition to the default kernels provided (Python, R, and MATLAB), it is possible to create your own kernels. To install kernels for other languages, see the setup instructions for the language here.
$ conda create --name myenv python=2.7 $ source activate myenv $ conda install jupyter $ python -m ipykernel install --user --name python_custom --display-name "My Python"
See the Conda documentation for more details about Conda environments.