Translations:JupyterNotebook/5/en: Difference between revisions

Importing a new version from external source
(Importing a new version from external source)
(Importing a new version from external source)
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
#Load the Python module.
<ol>
#:{{Command|module load python/3.5.2}}
<li>Load the Python module.
#Create a new Python virtual environment.
{{Command2|module load python/3.7}}
#:{{Command|virtualenv $HOME/jupyter_py3}}
<li>Create a new Python virtual environment.
#Activate your newly created Python virtual environment.
{{Command2|virtualenv $HOME/jupyter_py3}}
#:{{Command|source $HOME/jupyter_py3/bin/activate}}
<li>Activate your newly created Python virtual environment.
#Install Jupyter Notebook in your new virtual environment.
{{Command2|source $HOME/jupyter_py3/bin/activate}}
#:{{Command
<li>Install Jupyter Notebook in your new virtual environment.
|prompt=(jupyter_py3)[name@server $]
{{Commands2
|pip install jupyter}}
|prompt=(jupyter_py3) [name@server ~]$
#In the virtual environment, create a wrapper script that launches Jupyter Notebook.
|pip install --no-index --upgrade pip
#:{{Command
|pip install --no-index jupyter
|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
}}
}}
#Finally, make the script executable.
<li>In the virtual environment, create a wrapper script that launches Jupyter Notebook.
#:{{Command
{{Command2
|prompt=(jupyter_py3)[name@server $]
|prompt=(jupyter_py3)_[name@server ~]$
|echo -e '#!/bin/bash\nexport JUPYTER_RUNTIME_DIR{{=}}$SLURM_TMPDIR/jupyter\njupyter notebook --ip $(hostname -f) --no-browser' > $VIRTUAL_ENV/bin/notebook.sh
}}
<li>Finally, make the script executable.
{{Command2
|prompt=(jupyter_py3)_[name@server ~]$
|chmod u+x $VIRTUAL_ENV/bin/notebook.sh
|chmod u+x $VIRTUAL_ENV/bin/notebook.sh
}}
}}
</ol>
38,760

edits