Install Ancil python version problem

Hi,

I’ve generated an error I haven’t seen before with a suite (u-cu408) which was working fine previously.

File “/work/n02/n02/jweber/cylc-run/u-cu408/app/install_ancil/bin/create_ancil_links.py”, line 86
print ‘Link {0} to {1}’.format(link, target)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to ‘print’. Did you mean print(…)?
[FAIL] create_ancil_links.py <<‘STDIN
[FAIL]
[FAIL] ‘STDIN’ # return-code=1
2023-03-21T14:22:27Z CRITICAL - failed/EXIT

This looks like a python version error. I think this may have come about as made some changes to the python environment because I wanted to use cf python on Archer2 to extract particular fields before transferring model output to Jasmin to save space and reduce transfer time. I ran the commands in Section 1-4 of this Reducing UM-UKCA data output using flight-track simulation document first in my work (incorrectly) and then in home (correctly).

cfpython is now working on Archer2 but do I need to need to switch back to a different python version to run UKESM?

Cheers,

James

Hi James,

Yes you are correct this is a python version error.

The install_ancil/bin/create_ancil_links.py will use the version of python in your login environment; so if you’ve change it from the default python2 to python3 then it will fail.

I would suggest removing the python version change from your ~/.bashrc or ~/.bash_profile and only load it into your login session when you need it.

Regards,
Ros.

Thanks, Ros, that makes sense. Once a suite has starting running on coupled, would it be ok to change python versions or will a suite need the same python version for the whole course of its run?

Cheers,

James

Each task will load your environment afresh when it is submitted to A2. It doesn’t remember what it loaded in a previous task or cycle.

However, install_ancil is only called once at the beginning of the run, so assuming there are no other tasks that need python2 you should be ok.

Great, thanks Ros.