0
I'm trying to submit a simple python script to PBS using the command:
qsub -l procs=1 -q copperhead test.py, but the command fails with the error file (i.e., test.py.e--) saying:
/var/spool/torque/mom_priv/jobs/1339901.cph-m1.uncc.edu.SC: line 3: syntax error near unexpected token `('
/var/spool/torque/mom_priv/jobs/1339901.cph-m1.uncc.edu.SC: line 3: `with open('a.out','w') as f:'
The contents of test.py is:
with open('a.out','w') as f:
pass
First, I run module load anaconda5
which installs conda version 4.6.14 and python 3.6.7. When I just run python test.py
, it works. When I submit the "test.py" in a shell script to PBS, it works. But the "test.py" fails to execute when submitted directly to PBS.
Which version of Python are you running? And please edit the question to format the quote as such. – l0b0 – 2019-09-08T08:25:11.520
Hi
It is Python 3.6.7 – shambakey1 – 2019-09-08T16:59:01.037