On a server I am working on, I need to run the following commands to ensure the xlsxwriter
is available to import from python:
module load swdev
module load python/xlsxwriter_py3.4.2/0.7.2
However, I would like this to be done automatically when the python script that needs it is run, from within the python script. Running os.system
or subprocess.call
doesn't work. How do I do this?