title: Changing Python path variable in Openshift NodeJS cartridge
body: <p>I have a NodeJS web server (Express) locally that uses <a href="https://github.com/extrabacon/python-shell" rel="nofollow">Python-Shell</a> to fire off Python scripts (mostly scraper stuff using <a href="http://pycurl.io/" rel="nofollow">PyCurl</a>). The Python scripts also use various modules that I have installed using pip. This all works locally with no issues, running Node v4.1.1 and Python 2.7.10.</p>
  
  <p>Now, I need a server to run this setup on, and I'm cheap, so I really want to use <a href="https://www.openshift.com/" rel="nofollow">Openshift</a>, which I have used before for other Node-only projects.</p>
  
  <p>My problem is that I need to work with Python, and while it is installed (v2.6 anyway), I can't do much with it. Pip is not installed at all, and I don't have administrative rights to install it. Easy_install seems to be present, but I get permission issues when trying to execute it (even just the test via "easy_install" with no parameters). I need pip to install several modules for my Python scripts.</p>
  
  <p>I was able to follow the instructions <a href="https://blog.openshift.com/enabling-python-27-on-a-paas-with-the-openshift-diy-app-type/" rel="nofollow">here</a> and get Python 2.7, setuptools, and pip all installed successfully, but they are only available by prefixing the path $OPENSHIFT_DATA_DIR/bin (which resolves to /var/lib/openshift/[my-id]/app-root/data/bin). So...</p>
  
  <pre><code>\&gt; $OPENSHIFT_DATA_DIR/bin/python -V
  Python 2.7.3
  </code></pre>
  
  <p>I can also successfully run my Python scripts if I prefix the python command with that path.</p>
  
  <p>So my question is how can I either get python-shell to use that path for Python, or <strong>how can I update Openshift's environment variables so that the standard "python" command is pointed to my manually-built v2.7.3 executable</strong>?</p>
  
  <p>I'm stumped, but I know next to nothing about Linux or Openshift's architecture specifically, so I'm hoping you guru's out there can help me out!</p>