other:python:starting
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
other:python:starting [2022/01/04 23:06] – [Using the LSCE jupyterhub server] Added user kernel definition jypeter | other:python:starting [2023/02/01 11:29] – [Initialization] Updated the instruction 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 191: | Line 203: | ||
< | < | ||
- | > | + | $ module |
[...] | [...] | ||
- | 4ARTIC/3.6 | + | python/2.7 |
- | batch_env | + | python/ |
- | [...] | + | python/2-ramces |
- | glost/0.3.1 ncview/2.1.7 python/2.7 | + | python/3 |
+ | python/3.9 | ||
+ | python/4artic | ||
+ | python/esmpy | ||
+ | python/ | ||
[...] | [...] | ||
- | > | + | $ module load python/3.9 |
- | > | + | $ which python |
- | / | + | / |
- | > | + | $ python |
- | Python | + | Python |
- | [GCC 7.3.0] on linux2 | + | [GCC 7.5.0] :: Anaconda, Inc. on linux |
Type " | Type " | ||
>>> | >>> | ||
Line 219: | Line 235: | ||
* Contact: Jean-Yves Peterschmitt (//JYP//) @ LSCE | * Contact: Jean-Yves Peterschmitt (//JYP//) @ LSCE | ||
* Where: //obelix// interactive servers and cluster at LSCE, //ciclad// interactive servers and cluster at IPSL, irene @ TGCC | * Where: //obelix// interactive servers and cluster at LSCE, //ciclad// interactive servers and cluster at IPSL, irene @ TGCC | ||
- | * Initialization type: conda based or [[other: | + | * Initialization type: conda based |
* What's installed: type '' | * What's installed: type '' | ||
Line 232: | Line 248: | ||
== Initialization == | == Initialization == | ||
- | Read the [[https:// | + | Read the [[https:// |
Note: on the ciclad cluster, use '' | Note: on the ciclad cluster, use '' | ||
Line 290: | Line 306: | ||
</ | </ | ||
- | |||
- | ==== Anaconda ==== | ||
- | |||
- | <note tip>This is the recommended Python distribution/ | ||
- | |||
- | [[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 319: | Line 318: | ||
* [[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 325: | Line 335: | ||
[[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.txt · Last modified: 2025/07/03 16:18 by jypeter