title: difficulty installing rpy2 using Python 3.8 via anaconda with R version 4.0.2 on Mac osx
body: <p>I have never used R code in python before, but would like to do so in order to implement some Poisson regression models. The reason for this is efficiency (R code for poisson regression much more efficient). I have attempted to install rpy2 by entering the following into my terminal:</p>
  <p>conda install -c r rpy2</p>
  <p>I have also tried to use pip install with no success. When I attempt to run this in my terminal, it returns the following error in the terminal itself:</p>
  <p>Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
  Collecting package metadata (repodata.json): done
  Solving environment: failed with initial frozen solve. Retrying with flexible solve.
  Solving environment: /
  Found conflicts! Looking for incompatible packages.
  This can take several minutes.  Press CTRL-C to abort.
  failed</p>
  <p>UnsatisfiableError: The following specifications were found
  to be incompatible with the existing python installation in your environment:</p>
  <p>Specifications:</p>
  <ul>
  <li>rpy2 -&gt; python[version='2.7.<em>|3.5.</em>|3.6.<em>|&gt;=2.7,&lt;2.8.0a0|&gt;=3.5,&lt;3.6.0a0|&gt;=3.6,&lt;3.7.0a0|&gt;=3.7,&lt;3.8.0a0|3.4.</em>|3.3.*']</li>
  </ul>
  <p>Your python: python=3.8</p>
  <p>If python is on the left-most side of the chain, that's the version you've asked for.
  When python appears to the right, that indicates that the thing on the left is somehow
  not available for the python version you are constrained to. Note that conda will not
  change your python version to a different minor version unless you explicitly specify
  that.</p>
  <p>After using pip install, and running some code referencing rpy2 modules, I received the following errors:</p>
  <pre><code>import rpy2.robjects as robjects
  import rpy2.robjects.packages as rpackages
  from rpy2.robjects.vectors import StrVector
  
  
  package_names = ('stats')
  
  if all(rpackages.isinstalled(x) for x in package_names):
      have_package = True
  
  else: 
      have_package = False
  
  if not have_package: 
      utils = rpackages.importr('utils')
      utils.chooseCRANmirror(ind=1)
      
      packnames_to_install = [x for x in package_names if not rpackages.isinstalled(x)]
      
      if len(packnames_to_install) &gt; 0: 
          utils.install_packages(StrVector(packnames_to_install))
  </code></pre>
  <p>OSError: cannot load library '/Users/name/opt/anaconda3/lib/R/lib/libR.dylib': dlopen(/Users/name/opt/anaconda3/lib/R/lib/libR.dylib, 2): Library not loaded: @rpath/libreadline.6.2.dylib
  Referenced from: /Users/name/opt/anaconda3/lib/R/lib/libR.dylib
  Reason: image not found</p>
  <p>NameError: name 'rpackages' is not defined</p>
  <p>Does anyone know how I can successfully use rpy2 in my python 3.8? It seems like this is a common issue with anaconda, but I have not been able to find any actionable solutions on the web. Any help you can provide is much appreciated!</p>