Python environment error

Since the archer2 upgrade, I am getting an error to do with the python environment on archer2 in u-cu858:

I’ve tried adding the line #!/usr/bin/env python

at the top of the script.

I’ve also tried changing the pythonpath to PYTHONPATH=/work/y07/shared/utils/core/python/miniconda2/bin/python

which is where the archer2 helpdesk said python2 can be found after the software upgrade:

They said:

To support NCAS users, my colleague Andy Turner has created a virtual environment that contains python 2 in /work/y07/shared/utils/core/python/miniconda2/ even though HPE no longer supports python2.

If I activate the environment, I get access to both python2 and python3:

rapostol@ln02:~> source /work/y07/shared/utils/core/python/miniconda2/bin/activate
(base) rapostol@ln02:~> python --version
Python 2.7.18 :: Anaconda, Inc.
(base) rapostol@ln02:~> python2 --version
Python 2.7.18 :: Anaconda, Inc.
(base) rapostol@ln02:~> python3 --version
Python 3.6.15

I’m wondering how I can set the python environment to python2 in my rose suite - I tried putting the line source /work/y07/shared/utils/core/python/miniconda2/bin/activate in my .bash_profile on archer2 but this hasn’t made a difference.

The full error I’m getting is:

Lmod is automatically replacing “cce/15.0.0” with “gcc/11.2.0”.

Lmod is automatically replacing “PrgEnv-cray/8.3.3” with “PrgEnv-gnu/8.3.3”.

Due to MODULEPATH changes, the following have been reloaded:

  1. cray-hdf5-parallel/ 3) cray-netcdf-hdf5parallel/
  2. cray-mpich/8.1.23

Currently Loaded Modules:

  1. craype-x86-rome
  2. libfabric/
  3. craype-network-ofi
  4. perftools-base/22.12.0
  5. xpmem/2.5.2-2.4_3.30__gd0f7936.shasta
  6. bolt/0.8
  7. epcc-setup-env
  8. load-epcc-module
  9. oasis3-mct/2.0/v1/2466
  10. XIOS/2.0/v1/952
  11. GC3-PrgEnv/v1
  12. gcc/11.2.0
  13. craype/2.7.19
  14. cray-dsmml/0.2.2
  15. cray-mpich/8.1.23
  16. cray-libsci/
  17. PrgEnv-gnu/8.3.3
  18. cray-hdf5-parallel/
  19. cray-netcdf-hdf5parallel/
  20. hypre/2.25.0
  21. metis/5.1.0
  22. parmetis/4.0.3
  23. scotch/7.0.3
  24. mumps/5.5.1
  25. superlu/5.2.2
  26. superlu-dist/8.1.2
  27. petsc/3.18.5
  28. nco/5.1.6

Traceback (most recent call last):
File “/work/n02/n02/rutrns/cylc-run/u-cu858/share/fcm_make_unicicles/scripts/bin/”, line 4, in
import numpy as np
ImportError: No module named numpy
[FAIL] ‘STDIN’ # return-code=1
2023-07-20T09:22:54Z CRITICAL - failed/EXIT