38,760
edits
(Importing a new version from external source) |
(Importing a new version from external source) |
||
Line 1: | Line 1: | ||
<ol> | |||
<li>Load the Python module. | |||
{{Command2|module load python/3.6}} | |||
<li>Create a new Python virtual environment. | |||
{{Command2|virtualenv $HOME/jupyter_py3}} | |||
<li>Activate your newly created Python virtual environment. | |||
{{Command2|source $HOME/jupyter_py3/bin/activate}} | |||
<li>Install Jupyter Notebook in your new virtual environment. | |||
{{Command2 | |||
|prompt=(jupyter_py3)_[name@server ~]$ | |prompt=(jupyter_py3)_[name@server ~]$ | ||
|pip install jupyter}} | |pip install jupyter}} | ||
<li>In the virtual environment, create a wrapper script that launches Jupyter Notebook. | |||
{{Command2 | |||
|prompt=(jupyter_py3)_[name@server ~]$ | |prompt=(jupyter_py3)_[name@server ~]$ | ||
|echo -e '#!/bin/bash\nunset XDG_RUNTIME_DIR\njupyter notebook --ip $(hostname -f) --no-browser' > $VIRTUAL_ENV/bin/notebook.sh | |echo -e '#!/bin/bash\nunset XDG_RUNTIME_DIR\njupyter notebook --ip $(hostname -f) --no-browser' > $VIRTUAL_ENV/bin/notebook.sh | ||
}} | }} | ||
<li>Finally, make the script executable. | |||
{{Command2 | |||
|prompt=(jupyter_py3)_[name@server ~]$ | |prompt=(jupyter_py3)_[name@server ~]$ | ||
|chmod u+x $VIRTUAL_ENV/bin/notebook.sh | |chmod u+x $VIRTUAL_ENV/bin/notebook.sh | ||
}} | }} | ||
</ol> |