Translations:JupyterNotebook/5/en: Difference between revisions
Jump to navigation
Jump to search
(Importing a new version from external source) |
(Importing a new version from external source) |
||
Line 1: | Line 1: | ||
#Load the Python module | #Load the Python module. | ||
#:{{Command|module load python/3.5.2}} | #:{{Command|module load python/3.5.2}} | ||
#Create a new Python virtual environment | #Create a new Python virtual environment. | ||
#:{{Command|virtualenv $HOME/jupyter_py3}} | #:{{Command|virtualenv $HOME/jupyter_py3}} | ||
#Activate your newly created Python virtual environment | #Activate your newly created Python virtual environment. | ||
#:{{Command|source $HOME/jupyter_py3/bin/activate}} | #:{{Command|source $HOME/jupyter_py3/bin/activate}} | ||
#Install Jupyter | #Install Jupyter Notebook in your new virtual environment. | ||
#:{{Command | #:{{Command | ||
|prompt=(jupyter_py3)[name@server $] | |prompt=(jupyter_py3)[name@server $] | ||
|pip install jupyter}} | |pip install jupyter}} | ||
#In | #In the virtual environment, create a wrapper script that launches Jupyter Notebook. | ||
#:{{Command | #:{{Command | ||
|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 | ||
}} | }} | ||
#Finally, make the script executable | #Finally, make the script executable. | ||
#:{{Command | #:{{Command | ||
|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 | ||
}} | }} |
Revision as of 20:52, 24 October 2017
- Load the Python module.
-
[name@server ~]$ module load python/3.5.2
-
- Create a new Python virtual environment.
-
[name@server ~]$ virtualenv $HOME/jupyter_py3
-
- Activate your newly created Python virtual environment.
-
[name@server ~]$ source $HOME/jupyter_py3/bin/activate
-
- Install Jupyter Notebook in your new virtual environment.
-
(jupyter_py3)[name@server $] pip install jupyter
-
- In the virtual environment, create a wrapper script that launches Jupyter Notebook.
-
(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.
-
(jupyter_py3)[name@server $] chmod u+x $VIRTUAL_ENV/bin/notebook.sh
-