title: Using a local module instead of system installed module (Python 2.x.x)
body: <p>I have a cluster system at work with Python and some modules installed on that system - however I wanted to use the most up to date version of the module - it has several methods not present in older versions, so I built it and it's deps locally in the area I have access to:</p>
  
  <pre><code># From my home directory: /gpfs/env/yrq12edu
  
  # Get the source I need for the up to date version of the module I want to install locally.
  svn co svn://svn.code.sf.net/p/simupop/code/trunk simuPOP
  
  # Install PCRE stuff...
  cd pcre-8.34
  ./configure --prefix=/gpfs/env/yrq12edu/pcre_install
  make
  make install
  export PATH=/gpfs/env/yrq12edu/pcre_install/bin:$PATH
  export LD_LIBRARY_PATH=/gpfs/env/yrq12edu/pcre_install/lib:$LD_LIBRARY_PATH
  cd ..
  
  # Install Swig Stuff...
  cd swig-3.0.0
  ./configure --prefix=/gpfs/env/yrq12edu/swig_install
  make
  make install
  export PATH=/gpfs/env/yrq12edu/swig_install/bin:$PATH
  cd ..
  
  export PYTHONPATH=/gpfs/env/yrq12edu/PythonModules/lib/python2.7/site-packages
  
  # Build the up to date simuPOP module I need locally...
  cd simuPOP
  python setup.py install --prefix=/gpfs/env/yrq12edu/PythonModules 
  </code></pre>
  
  <p>How can I ensure that when I execute my Python scripts in the cluster it will try and use my local module rather than the system one? I have obviously changed PYTHONPATH during the build process which I know should allow modules to be loaded locally, but wondered which it will load when there is the choice of the system installed old version, or my new locally installed version. Will Python just know to favour the local one and load it instead or do I have to specify some option to force it?</p>
  
  <p>Thanks,
  Ben W.</p>