title: Rpy2 error wac-a-mole: R_USER not defined
body: <p>I'm running Python (x,y) 2.7 on windows 7 32 bit and R version 3.1.0. I've been trying to install Rpy2 and have been getting many errors. I finally found this site which has pre-compiled python modules for windows <a href="http://www.lfd.uci.edu/~gohlke/pythonlibs/" rel="noreferrer">http://www.lfd.uci.edu/~gohlke/pythonlibs/</a>, so I downloaded rpy2‑2.4.2.win32‑py2.7.exe. When I did this and tried </p>
  
  <pre><code>import rpy2.robjects as robjects
  </code></pre>
  
  <p>I had an error saying it could not find R_HOME, so I updated my path variables. This was fixed, but then I got an error saying it could not find R_USER. Once again, I updated my PYTHONPATH variables based on SO responses. This didn't work, and so I'm stuck. I've updated my PYTHONPATH both inside Spyder and also in my system variables, but still no luck. Does anyone know what could be going on? This is the error I get:</p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "C:\Python27\lib\site-packages\rpy2\robjects\__init__.py", line 18, in &lt;module&gt;
      from rpy2.robjects.robject import RObjectMixin, RObject
    File "C:\Python27\lib\site-packages\rpy2\robjects\robject.py", line 5, in &lt;module&gt;
      rpy2.rinterface.initr()
  RuntimeError: R_USER not defined.
  </code></pre>
  
  <p>This is what my PYTHONPATH includes:</p>
  
  <pre><code>C:\Python27\Lib\site-packages\rpy2;C:\Program Files\R\R-3.1.0\bin\i386;C:\Python27\Lib\site-packages\rpy2\robjects
  </code></pre>
  
  <p>This is what my PATH includes:</p>
  
  <pre><code>C:\Python27\Lib\site-packages\PyQt4;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;c:\Program Files\Intel\DMIX;C:\Program Files\Intel\Services\IPT\;C:\Python27;C:\Python27\DLLs;C:\Python27\Scripts;C:\Python27\Lib\site-packages\vtk;C:\Python27\gnuplot\binary;C:\Program Files\pythonxy\SciTE-3.1.0;C:\Program Files\pythonxy\console;C:\MinGW32-xy\bin;C:\Program Files\R\R-3.1.0\bin;C:\MinGW32-xy\mingw32\bin;C:\MinGW32-xy\bin
  </code></pre>
  
  <p>Thanks for any help you can provide!</p>