title: Importing Rpy with python 2.6, R2.14 and Win 7x64 error
body: <p>I am trying to import rpy into python.  I keep getting this error.</p>
  
  <pre><code>Traceback (most recent call last):
  File "&lt;pyshell#0&gt;", line 1, in module
      import rpy
    File "E:\Python26\lib\site-packages\rpy.py", line 58, in module
      RVERSION = rpy_tools.get_R_VERSION(RHOME)
    File "E:\Python26\lib\site-packages\rpy_tools.py", line 103, in get_R_VERSION
      raise RuntimeError("Couldn't obtain version number from output\n"
  RuntimeError: Couldn't obtain version number from output
  of `R --version'.
  </code></pre>
  
  <p>I looked on the forums and found the following thread with the same issue.  Followed what someone recommend there and I still get the same error.  I have Rpy 1.0.3, Python 2.6, R2.14 and Windows 7 x64.  I also have numpy 1.6.1 and pywin32 build 216 per recommended by the rpy site for windows installs.</p>
  
  <p><a href="https://stackoverflow.com/questions/5890706/importing-rpy-module-into-python">Importing rpy module into python</a></p>
  
  <p>R is in the path and the same error still occurs.</p>
  
  <p>Added the path to the x64 R.exe. Also went in like the above post and added the extra +'s.  Still runs in Command line but now getting a new error.  </p>
  
  <blockquote>
    <p>Traceback (most recent call last):<BR>
          File "", line 1, in <BR>
           import rpy<BR>
          File "E:\Python26\Lib\site-packages\rpy.py", line 101, in <BR>
           raise RuntimeError("Unable to locate R.dll within %s" % RHOME)<BR>
         RuntimeError: Unable to locate R.dll within C:\Program Files\R\R-2.14.0</p>
  </blockquote>
  
  <p>Going to search Stack for other errors witl the R.dll.  Seems there are 2 R.dll's too. one in i386 and one in x64.  </p>
  
  <p>Found in rpy.py </p>
  
  <p>if sys.platform=='win32':
      import win32api
      os.environ['PATH'] += ';' + os.path.join(RHOME,'bin')</p>
  
  <p>So I added in after 'bin' a 'i386','x64','R.dll'. Still the same error even after I tell it where to look.  Found some stuff on editing the "rinterface/<strong>init</strong>.py" but I can't find this file.  Granted that was for rpy2 that seems to be running into the same problem.</p>
  
  <p>Well not sure what I changed but now I am getting the following</p>
  
  <blockquote>
    <p>Traceback (most recent call last):<BR>
      File "", line 1, in <BR>
        import rpy<BR>
      File "E:\Python26\lib\site-packages\rpy.py", line 106, in <BR>
        win32api.LoadLibrary( Rlib )<BR>
    error: (126, 'LoadLibrary', 'The specified module could not be found.')</p>
  </blockquote>
  
  <p>Tried it in x64 mode. Got an error that loadlibrary cant work in x64 as it is a win32 module.  Went back to i386 and thus got an error saying rpy wont work with R2.14.0. Going to try a old version of R.</p>
  
  <p>Upon further review I am an idiot.  I downloaded rpy2 made the same following changes and it works like a charm.</p>