calcoloscientifico:userguide:python
Differenze
Queste sono le differenze tra la revisione selezionata e la versione attuale della pagina.
Entrambe le parti precedenti la revisioneRevisione precedenteProssima revisione | Revisione precedente | ||
calcoloscientifico:userguide:python [27/08/2025 17:47] – [Python virtualenv] fabio.spataro | calcoloscientifico:userguide:python [27/08/2025 18:13] (versione attuale) – fabio.spataro | ||
---|---|---|---|
Linea 17: | Linea 17: | ||
==== Python 2.7.14 virtualenv ==== | ==== Python 2.7.14 virtualenv ==== | ||
- | Create a virtual environment for "machine-learning": | + | Create a virtual environment for '' |
< | < | ||
Linea 31: | Linea 31: | ||
</ | </ | ||
- | Activate | + | Activate |
< | < | ||
Linea 37: | Linea 37: | ||
</ | </ | ||
- | Install packages in "machine-learning" | + | Install packages in '' |
< | < | ||
Linea 43: | Linea 43: | ||
</ | </ | ||
- | Deactivate | + | Deactivate |
< | < | ||
Linea 58: | Linea 58: | ||
=== Site installation === | === Site installation === | ||
- | Activate | + | Activate |
< | < | ||
Linea 69: | Linea 69: | ||
---- | ---- | ||
- | Activate | + | Activate |
< | < | ||
Linea 80: | Linea 80: | ||
---- | ---- | ||
- | Activate | + | Activate |
< | < | ||
Linea 101: | Linea 101: | ||
=== User installation === | === User installation === | ||
- | Create | + | Create |
< | < | ||
Linea 110: | Linea 110: | ||
</ | </ | ||
- | Update | + | Update |
< | < | ||
Linea 119: | Linea 119: | ||
</ | </ | ||
- | Activate | + | Activate |
< | < | ||
Linea 130: | Linea 130: | ||
---- | ---- | ||
- | Create | + | Create |
< | < | ||
Linea 139: | Linea 139: | ||
</ | </ | ||
- | Update | + | Update |
< | < | ||
Linea 148: | Linea 148: | ||
</ | </ | ||
- | Activate | + | Activate |
< | < | ||
Linea 159: | Linea 159: | ||
---- | ---- | ||
- | Create | + | Create |
< | < | ||
Linea 168: | Linea 168: | ||
</ | </ | ||
- | Update | + | Update |
< | < | ||
Linea 177: | Linea 177: | ||
</ | </ | ||
- | Activate | + | Activate |
< | < | ||
Linea 199: | Linea 199: | ||
=== User installation === | === User installation === | ||
+ | |||
+ | Require a node with '' | ||
+ | |||
+ | < | ||
+ | srun \ | ||
+ | --job-name=srun \ | ||
+ | --nodes=1 \ | ||
+ | --ntasks-per-node=1 \ | ||
+ | --cpus-per-task=1 \ | ||
+ | --time=0-01: | ||
+ | --mem=1G \ | ||
+ | --partition=cpu \ | ||
+ | --qos=normal \ | ||
+ | --pty \ | ||
+ | bash | ||
+ | </ | ||
Create '' | Create '' | ||
Linea 205: | Linea 221: | ||
mkdir -p " | mkdir -p " | ||
python3 -m venv " | python3 -m venv " | ||
- | . " | + | source |
python3 -m pip install --upgrade pip | python3 -m pip install --upgrade pip | ||
python3 -m pip install --upgrade jupyter notebook ipyparallel | python3 -m pip install --upgrade jupyter notebook ipyparallel | ||
Linea 215: | Linea 231: | ||
< | < | ||
- | . " | + | source |
python3 -m pip install --upgrade pip | python3 -m pip install --upgrade pip | ||
python3 -m pip install --upgrade jupyter notebook ipyparallel | python3 -m pip install --upgrade jupyter notebook ipyparallel | ||
#python3 -m pip install --upgrade other_packages_for_my_project | #python3 -m pip install --upgrade other_packages_for_my_project | ||
deactivate | deactivate | ||
- | </ | ||
- | |||
- | Require a node with '' | ||
- | |||
- | < | ||
- | srun \ | ||
- | --job-name=srun \ | ||
- | --nodes=1 \ | ||
- | --ntasks-per-node=1 \ | ||
- | --cpus-per-task=1 \ | ||
- | --time=0-01: | ||
- | --mem=1G \ | ||
- | --partition=cpu \ | ||
- | --qos=normal \ | ||
- | --pty \ | ||
- | bash | ||
</ | </ | ||
Linea 241: | Linea 241: | ||
< | < | ||
- | . " | + | source |
</ | </ | ||
Linea 255: | Linea 255: | ||
Open another shell and run the following command: | Open another shell and run the following command: | ||
- | ssh -N -L 127.0.0.1: | + | ssh -N -L 127.0.0.1: |
To access the notebook, open in a browser the URL which starts with | To access the notebook, open in a browser the URL which starts with |
calcoloscientifico/userguide/python.1756309636.txt.gz · Ultima modifica: da fabio.spataro