User Tools

Site Tools


python

Python

The cluster has both Python 2 and Python 3. To run Python 2 shell, simply type

python

and to exit it press Ctrl+Z. To run a pre-written python script, type

python script.py

To use Python 3, just substitute command to

python3

Installing Libraries

To install a library that doesn't come with the initial installation, you first need to create an environment

/opt/python37/bin/python3 -m venv environment_name

and then activate it

source environment_name/bin/activate

(you should now see the environment on the far left of the terminal line). After that, you can simply install any library using pip from the command line

pip install pandas
python.txt · Last modified: 2021/11/22 14:14 by schroeder