Using rpy2 for inline rmagic with jupyter notebook
<p>I am trying to use inline rmagic with jupyter notebook, but have had an extremely difficult time trying to get it to work. </p>

<p>Whenever I try to load <code>%load_ext rpy2.ipython</code>, I get the following error:</p>

<pre><code>ImportError: dlopen(/Users/MyName/anaconda/lib/python2.7/site
   packages/rpy2/rinterface/_rinterface.so, 2): Library not loaded: liblzma.5.dylib
   Referenced from: /Users/MyName/anaconda/lib/python2.7/site-
   packages/rpy2/rinterface/_rinterface.so
   Reason: image not found
</code></pre>

<p>I have tried installing it with <code>pip</code>, tried installing it with <code>conda install -c r rpy2</code>.</p>

<p>Beside this rpy2 issue, I <i>was</i> able to set up R and Jupyter notebook so that I can create a new notebook with R, so it doesn't seem to be an R/Jupyter communication issue. </p>

<p>I am running:</p>

<pre><code>OS X (El Capitan)
Python 2.7.12 :: Anaconda 4.1.1 (x86_64)
R version 3.3.1 (2016-06-21) (located as in /Users/myName/anaconda/bin)
rpy2 2.8.3 (located in /Users/myName/anaconda/lib/python2.7/site-packages/)
</code></pre>

<p>Is there any way to get <code>rpy2</code> to work with Jupyter notebook these days?</p>

<p>This is looking like a conda issue to me (lzma present at build time, but missing at run time).</p>

<blockquote>
  <p>Is there any way to get rpy2 to work with Jupyter notebook these days?</p>
</blockquote>

<p>Probably more than one way to achieve it, but the docker container mentioned on the front page (<a href="http://rpy2.bitbucket.org/" rel="nofollow">http://rpy2.bitbucket.org/</a>) is getting all pieces together in one step.</p>

python anaconda jupyter-notebook rpy2