There are many python distributions, many python versions (2.7.xx
, 3.nn
) and… many ways to use python:
python -i script.py
and then typing interactive commands)python
interpreter or the ipython
interpreter > python Python 3.6.7 | packaged by conda-forge | (default, Feb 28 2019, 09:07:38) [GCC 7.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> "python interpreter in a terminal".upper() 'PYTHON INTERPRETER IN A TERMINAL' >>> > ipython Python 3.6.7 | packaged by conda-forge | (default, Feb 28 2019, 09:07:38) Type 'copyright', 'credits' or 'license' for more information IPython 7.3.0 -- An enhanced Interactive Python. Type '?' for help. In [1]: "ipython interpreter in a terminal".upper() Out[1]: 'IPYTHON INTERPRETER IN A TERMINAL' In [2]: Do you really want to exit ([y]/n)? y
.ppynb
file) and share it, and it will display both the commands you have used and the output/results of your commandsUsing an ipython notebooks implies the following steps:
jupyter notebook
, but only do this if you want to work locally on your desktop/laptop! See the next section for working on a remote computerjupyter notebook
command will start the notebook server, and it will automatically start a web browser on the same computer. That's OK on your local computer, but on a remote server, the browser will probably seem to be slow (and probably out of date) and will use unnecessary resources of the server. This will be frustrating for you and the other users of the server^C^C
(2x CTRL-C
) in the terminal where you started the server. Otherwise the server and the python processes started by the server will keep on using resources on the computerLogout
button in the browser will not stop the ipython server. You can stop the server by clicking on the XXXX
buttonjupyter notebook
You need to meet the following prerequisites in order to create an ssh tunnel to the remote server where your notebook server will run
<LOGIN>
below with your account name<PPPP>
with your specific port number/ciclad-home/jservon/Evaluation/CliMAF/climaf_installs/climaf_1.2.10/bin/cmip6.notebook.txt
filessh
is installed by defaultCTRL
+Esc
to open the start menu, then type PowerShell
and start a PowerShell)ssh
:ssh
with plink
if you are using Windows 7, because plink is the name of the Putty ssh command-line executableThe ssh tunnels will allow you to connect a web browser running locally on your computer to a notebook server running on a remote server
ssh -L 7225:localhost:7225 jypeter@obelix
In that case, we have to go through the ssh1 gateway before connecting to obelix
plink -L 7225:localhost:7225 jypeter@obelix plink -L 7225:localhost:7225 jypeter@obelix ssh -X -t -L7100:localhost:7100 jypeter@ssh1.lsce.ipsl.fr ssh -L7100:localhost:7100 obelix plink -X -t -L7100:localhost:7100 jypeter@ssh1.lsce.ipsl.fr ssh -L7100:localhost:7100 obelix plink -ssh -X -t -L 7100:localhost:7100 jypeter@ssh1.lsce.ipsl.fr ssh -L7100:localhost:7100 obelix plink -X -t -L 7100:localhost:7100 jypeter@ssh1.lsce.ipsl.fr ssh -L7100:localhost:7100 obelix ssh -X -t -L 7100:localhost:7100 jypeter@ssh1.lsce.ipsl.fr ssh -L 7100:localhost:7100 obelix (cdatm_py3) jypeter@obelix3 - ...jypeter - 44 >jupyter notebook --no-browser --port=7100 [I 23:37:26.017 NotebookApp] [nb_conda_kernels] enabled, 14 kernels found [I 23:37:26.977 NotebookApp] [nb_conda] enabled [I 23:37:26.978 NotebookApp] Serving notebooks from local directory: /home/users/jypeter [I 23:37:26.978 NotebookApp] The Jupyter Notebook is running at: [I 23:37:26.978 NotebookApp] http://localhost:7100/?token=256f8fa26c8478f136720e0c0c24c4995b6682d9febf6387 [I 23:37:26.978 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [C 23:37:26.992 NotebookApp] To access the notebook, open this file in a browser: file:///home/users/jypeter/.local/share/jupyter/runtime/nbserver-1442-open.html Or copy and paste one of these URLs: http://localhost:7100/?token=256f8fa26c8478f136720e0c0c24c4995b6682d9febf6387
/ciclad-home/jservon/Evaluation/CliMAF/climaf_installs/climaf_1.2.10/bin/climaf-notebook
[ PMIP3 Wiki Home ] - [ Help! ] - [ Wiki syntax ]