#2943 closed error (fixed)

Error with Python?

Reported by: ha392 Owned by: um_support
Component: UM Model Keywords: Python
Cc: Platform: ARCHER
UM Version: 10.7



Hopefully this will be an easy question. I have a process calling python in my model but I seem to be getting an odd error with 'import mule'-


Traceback (most recent call last):
  File "/work/n02/n02/ha392/cylc-run/u-bj524/app/gen_initial_dumps/bin/gen_dumps", line 4, in <module>
    import mule
  File "/work/y07/y07/umshared/lib/python2.7/mule/__init__.py", line 56, in <module>
    import six
ImportError: No module named six

Am I calling this wrong in my 'gen_initial_dumps' file? Or do I need to set something up on my ARCHER?

Thank you,

Change History (3)

comment:1 Changed 19 months ago by ros

Hi Holly,

To run python on ARCHER you need to load the anaconda python environment.

In suite.rc in the [[gen_initial_dumps]] add after the inherit line:

pre-script = "module load anaconda"

I would also recommend changing the #!/usr/bin/python2 line at the top of the gen_dumps script to #!/usr/bin/env python so it picks up the correct python in the environment.

Hopefully that will fix things.


comment:2 Changed 19 months ago by ha392

Brilliant! Thank you, Ros!

comment:3 Changed 19 months ago by ros

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.