Question

I am trying to import the rpy2 (version2.3.4) library into Python (version3.2.3) on a Ubuntu 12.10 machine. The rpy2 documentation says that rpy2 works under all Python 3 versions and I am also finding other topics related to rpy2 and Python3.2 which show that these versions should work together. Anyhow when I try to import a module:

from rpy2 import robjects

the result is this:

Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/usr/local/lib/python3.2/dist-packages/rpy2/robjects/__init__.py", line 14, in <module>
    import rpy2.rinterface as rinterface
  File "/usr/local/lib/python3.2/dist-packages/rpy2/rinterface/__init__.py", line 8, in <module>
    raise RuntimeError("Python (>=2.7 and < 3.0) or >=3.3 are required to run rpy2")
RuntimeError: Python (>=2.7 and < 3.0) or >=3.3 are required to run rpy2

So, is rpy2 really not working with Python3.2 what would fit to the information the projects is giving me or waht might be the problem.

thx.

Was it helpful?

Solution

The rpy2 documentation says that rpy2 works under all Python 3 versions

Not quite, I hope; check the part about installing rpy2.

Python 3.2 will probably never be supported by rpy2 (Python 3.2 is already EOL). If your are after using Python 3, update to Python 3.3.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top