other:python:starting
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
other:python:starting [2022/08/11 14:11] – [CDAT] jypeter | other:python:starting [2024/09/13 16:20] (current) – Updated the jupyter section jypeter | ||
---|---|---|---|
Line 40: | Line 40: | ||
* In a //bash// shell: '' | * In a //bash// shell: '' | ||
* In a //tcsh// shell: '' | * In a //tcsh// shell: '' | ||
- | - Choose which //flavor// of Python | + | - Choose which environment |
- | * Python 2.7.x: '' | + | |
* Python 3.x: '' | * Python 3.x: '' | ||
+ | * You can use '' | ||
+ | - If you need an (older) Python 2.7 environment, | ||
+ | * '' | ||
+ | * '' | ||
- Type '' | - Type '' | ||
+ | - If you need a list of the installed packages (and their version), use | ||
+ | * '' | ||
+ | * A partial list of what is installed is available in the [[other: | ||
- Note: if you will have to use python regularly, you should add the '' | - Note: if you will have to use python regularly, you should add the '' | ||
* **Do not** add the '' | * **Do not** add the '' | ||
Line 50: | Line 56: | ||
< | < | ||
- | Last login: | + | Last login: |
bash-4.2$ which python | bash-4.2$ which python | ||
/ | / | ||
+ | |||
bash-4.2$ source ~jypeter/ | bash-4.2$ source ~jypeter/ | ||
+ | |||
bash-4.2$ which python | bash-4.2$ which python | ||
/ | / | ||
- | bash-4.2$ conda activate | + | |
- | (cdatm_py2) bash-4.2$ which python | + | bash-4.2$ conda activate |
- | / | + | |
- | (cdatm_py2) bash-4.2$ python | + | (cdatm_py3) bash-4.2$ which python |
- | Python | + | / |
- | [GCC 7.3.0] on linux2 | + | |
+ | (cdatm_py3) bash-4.2$ python | ||
+ | Python | ||
+ | [GCC 9.3.0] on linux | ||
Type " | Type " | ||
>>> | >>> | ||
Line 124: | Line 136: | ||
- | ===== Using the LSCE jupyterhub server ===== | + | ===== Using JupyterHub servers ===== |
+ | |||
+ | ==== JupyterHub servers available for LSCE users ==== | ||
+ | |||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * You will **have to** be on the LSCE wired network, or use the [[https:// | ||
+ | * Otherwise, check the IPSL server documentation, | ||
+ | |||
+ | ==== Notebooks and jupyter servers documentation | ||
+ | |||
+ | FIXME | ||
- | The [[https:// | ||
- | * from a computer on the LSCE wired network: https:// | ||
- | * from other computers: start the [[https:// | ||
==== Using a non-standard kernel ==== | ==== Using a non-standard kernel ==== | ||
Line 149: | Line 169: | ||
Available kernels: | Available kernels: | ||
python3 | python3 | ||
- | - Copy the existing kernel directory that you have found to your home directory. You can use the existing kernel name, or use a new kernel name (using only ASCII letters, numbers, | + | - Copy the existing kernel directory that you have found to your home directory. You can use the existing kernel name, or use a new kernel name (using only ASCII letters, numbers, |
+ | >cp -pr / | ||
> | > | ||
Line 185: | Line 206: | ||
==== LSCE distribution ==== | ==== LSCE distribution ==== | ||
- | * Contact: the LSCE system administrators | + | * Contact: the [[other: |
* Where: //obelix// interactive servers and //obelix// cluster at LSCE | * Where: //obelix// interactive servers and //obelix// cluster at LSCE | ||
* Initialization type: [[other: | * Initialization type: [[other: | ||
- | * What's installed: type '' | + | * What's installed: type '' |
< | < | ||
- | $ module | + | $ module avail python |
- | [...] | + | python/ |
- | python/2.7 | + | python/2.7.5 |
- | python/2.7.5 | + | |
- | python/ | + | |
- | python/3 | + | |
- | python/3.9 | + | |
- | python/4artic | + | |
- | python/esmpy | + | |
- | python/intel | + | |
- | [...] | + | |
$ module load python/3.9 | $ module load python/3.9 | ||
Line 209: | Line 222: | ||
$ python | $ python | ||
- | Python 3.9.7 (default, Sep 16 2021, 13:09:58) | + | Python 3.9.15 (main, Nov 24 2022, 14:31:59) |
- | [GCC 7.5.0] :: Anaconda, Inc. on linux | + | [GCC 11.2.0] :: Anaconda, Inc. on linux |
Type " | Type " | ||
>>> | >>> | ||
Line 236: | Line 249: | ||
== Initialization == | == Initialization == | ||
- | Read the [[https:// | + | Read the [[https:// |
Note: on the ciclad cluster, use '' | Note: on the ciclad cluster, use '' | ||
Line 294: | Line 307: | ||
</ | </ | ||
- | |||
- | ==== Anaconda ==== | ||
- | |||
- | <note tip>This is the recommended (by JYP) Python distribution/ | ||
- | |||
- | The [[https:// | ||
- | |||
- | |||
- | Note: Anaconda provides and uses '' | ||
- | |||
- | ==== Enthought Deployment Manager (EDM) ==== | ||
- | |||
- | <note tip>This was previously called //Enthought Python Distribution (EPD)// and then //Enthought Canopy//</ | ||
- | |||
- | [[https:// | ||
- | |||
- | There are native installers for Windows (.msi), Mac OS X (.pkg), RHEL/Fedora (.rpm), and Debian/ | ||
===== ipython ===== | ===== ipython ===== | ||
Line 323: | Line 319: | ||
* [[https:// | * [[https:// | ||
+ | |||
+ | ==== LSCE jupyter notebook server ==== | ||
+ | |||
+ | The different Python distributions available on the LSCE servers (interactive servers and cluster) can also be used on the [[https:// | ||
+ | * If your computer is on the LSCE wired network | ||
+ | * Or if you are using the [[https:// | ||
==== ipython notebook ==== | ==== ipython notebook ==== | ||
+ | |||
+ | <WRAP center round tip 60%> | ||
+ | If you want to use ipython notebooks at LSCE, you should **use the [[other: | ||
+ | </ | ||
+ | |||
<note warning> | <note warning> | ||
Line 329: | Line 336: | ||
[[https:// | [[https:// | ||
- | The ipython notebook is a way to interact with python (and other supported interpreted languages) inside a web browser. You can mix //cells// with python commands, cells with the output of the python commands (possibly graphics generated by the commands), and text (using some wiki-like rich text format). This interactive web page, aka notebook, can be saved in a '' | + | The **ipython notebook is a way to interact with python (and other supported interpreted languages) inside a web browser**. You can mix //cells// with python commands, cells with the output of the python commands (possibly graphics generated by the commands), and text (using some wiki-like rich text format). This interactive web page, aka notebook, can be saved in a '' |
Starting the notebook server: '' | Starting the notebook server: '' | ||
- | <note warning> | + | <note warning> |
+ | * **Warning!** When you start the notebook server, you will start a python process and a web browser, and a new python process will be started each time you open a new notebook. | ||
- | Please make sure that you shutdown cleanly each notebook and the server when you are finished, in order not to clutter the local computer or remote server with lots of python processes (especially | + | * Please make sure that you **shutdown cleanly each notebook and the server when you are finished**, in order not to clutter the local computer or remote server with lots of python processes (especially |
- | You may want to [[other: | + | * You may want to [[other: |
+ | </ | ||
/* standard page footer */ | /* standard page footer */ |
other/python/starting.1660219892.txt.gz · Last modified: 2022/08/11 14:11 by jypeter