Setting Up Environments
Goal: Understand how to load modules, reset your environment by purging, and potential dependency issues.
Setup Python environment
Let’s set up an environment to enable us to run Python scripts:
[]$ module purge
[]$ module load gcc/14.2.0
[]$ module load python/3.12.0
[]$ python --version
Can we combine the two module load
commands into a single line?
What is the difference, what happens, when we try the following two methods:
[]$ module purge
[]$ module load python/3.12.0 gcc/14.2.0
vs
[]$ module purge
[]$ module load gcc/14.2.0 python/3.12.0
Order matters!
Dependencies must be loaded first, so must be listed first, from left to right.
What’s happened to the PATH environment variable?
[]$ module purge
[]$ echo $PATH
/apps/s/arcc/1.0/bin:/apps/s/slurm/latest/bin:
/home/<username>/.local/bin:/home/<username>/bin:
/usr/share/Modules/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin
[]$ which python
/usr/bin/python
What’s Happening to My Environment?
Can we use the R language?
Can we use the R language? Fixed
Can we also use the Python language?
Load Another Compiler:
But R is still in my Module List?
Remember:
Exercises:
Exercises: Answers: