rpy2模塊在Python3.2中不能工作

[英]rpy2 module not working in Python3.2


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:

我正在嘗試將rpy2 (version2.3.4)庫導入到Ubuntu 12.10機器上的Python (version3.2.3)中。rpy2文檔說,rpy2在所有Python3版本下工作,我還發現了與rpy2和Python3.2相關的其他主題,它們表明這些版本應該一起工作。無論如何,當我嘗試導入一個模塊時:

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.

那么,rpy2真的不能用Python3.2嗎項目給我的信息適合什么呢或者waht可能是問題所在。

thx.

謝謝。

1 个解决方案

#1


0  

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

rpy2文檔說rpy2適用於所有的Python 3版本

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

不,我希望;檢查安裝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.

Python 3.2可能永遠不會得到rpy2 (Python 3.2已經是EOL)的支持。如果您是在使用Python 3之后,請更新到Python 3.3。


注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:https://www.itdaan.com/blog/2013/03/29/239e38396ad46e75522e0d3e27a603b7.html



 
  © 2014-2022 ITdaan.com 联系我们: