I'm trying to execute a python file in SunGrid engine, and I'm executing it from my anaconda3 environment variable.
my code is simple:
from __future__ import print_function
import urllib3
import numpy as np
if __name__ == '__main__':
print('Hellooo')
I'm calling it like:
qsub -V -b n -cwd -pe mp 3 playground.py
but I am getting this error:
from: can't read /var/mail/__future__
import: unable to open X server `' @ error/import.c/ImportImageCommand/358.
/var/spool/gridengine/execd/cluster-rp-02/job_scripts/22924: 3: /var/spool/gridengine/execd/cluster-rp-02/job_scripts/22924: Syntax error: word unexpected (expecting ")")
I looked online for the error and I found a solution her: Getting Python error “from: can't read /var/mail/Bio”
it proposed to add: #!/usr/bin/env python
in the beginning of the python code.
I'm using anaconda3 where the destination of the used python is not the same. So, it should be: #!../anaconda3/envs/py3/bin/python
But when I add this script I get this error:
/home/master/bin/sge_mp_startup.sh: 10: exec: /var/spool/gridengine/execd/cluster-rp-01/job_scripts/22926: not found
Did I miss something?