1
I'm currently working on a SGE and I'm extremely unfamiliar with the linux environment. I have to execute python scripts but the setup is kinda confusing for me and I can't get it to work.
The setup is the following : The default python installed is the 2.4 and I need to use the 2.7 with some libraries.
I then linked all I needed with these lines :
export LD_LIBRARY_PATH=/home/volatile/xxx/local/lib:$LD_LIBRARY_PATH
export LD_RUN_PATH=/home/volatile/xxx/local/lib:$LD_RUN_PATH
export PATH=/home/volatile/xxx/local/bin:$PATH
export PYTHONPATH=/home/volatile/xxx/src/scikit-learn:$PYTHONPATH
Then if I type these lines and call python test.py
it executes my code and it links everything great.
Then if I try to make a bash script (eligible for to send to the SGE) it won't work
': [Errno 2] No such file or directory
Here is the script
#!/bin/bash
#$ -N JOB_TKO
#$ -l h_vmem=1000M
#$ -l h_rt=864000
#$ -S /bin/bash
#$ -cwd
unset SGE_ROOT
export LD_LIBRARY_PATH=/home/volatile/xxx/local/lib:$LD_LIBRARY_PATH
export LD_RUN_PATH=/home/volatile/xxx/local/lib:$LD_RUN_PATH
export PATH=/home/volatile/xxx/local/bin:$PATH
export PYTHONPATH=/home/volatile/xxx/src/scikit-learn:$PYTHONPATH
python test.py
It won't even work if I removed the lines related to SGE and I do $ bash job.sh
#!/bin/bash
export LD_LIBRARY_PATH=/home/volatile/xxx/local/lib:$LD_LIBRARY_PATH
export LD_RUN_PATH=/home/volatile/xxx/local/lib:$LD_RUN_PATH
export PATH=/home/volatile/xxx/local/bin:$PATH
export PYTHONPATH=/home/volatile/xxx/src/scikit-learn:$PYTHONPATH
python test.py
If someone could make me understand why it doesn't work that would be really great, thanks!
Woaw thank you. I would never have found that on my own! – AdrienNK – 2014-03-12T08:21:54.930