Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

opts="-p batch -c 8 --mem=10000 --time=10:00:00 --mail-type=ALL --mail-user=$USER"
while read filenm; do
      outs="--output=$filenm.out --error=$filenm.err --mail-type=ALL --mail-user=$USER"
      echo "sbatch $opts $outs --wrap='R --no-save < $filenm'"
      sleep 1
done

...

A.  First, load the module for the python version ( e.g. 2.7) that you intend to use. That way the system managed module are loaded.

      module load python/2.7.6

Then create a local directory tree to store the modules ( ~/lib/python2.7/site-packages).  Append a modified PYTHONPATH to your .bash_profile and source it. This is only needed for the first time that this is done. 

    echo export PYTHONPATH="$PYTHONPATH:~/lib/python2.7/site-packages/" >> ~/.bash_profile
source ~/.bash_profile 

Now you can use pip or setup.py to load python modules locally.

    pip install --user <PACKAGE>

If there is a requirements file

    pip install --user -r requirements.txt

or after a python package is dowloaded and unpacked. Be sure to read the instructions for installing.

    python setup.py install