0

伙计们。我正在尝试在Windows 7 (64bit), Python 3.3上安装RPy2-2.3.8,但是RPy2似乎有很多安装问题...:(

我尝试通过在 Windows 环境的“cmd”上键入“python.exe setup.py install”来安装 RPy2。

R 版本 3.0.2 已成功安装,并将其路径添加到环境变量中。

但是,发生了以下错误。谁能告诉这个错误是什么意思?

**D:\>cd rpy2-2.3.8**

D:\rpy2-2.3.8>c:\Python33\python.exe setup.py install
Using 2to3 to translate Python2-only idioms into Python3 code. Please wait...
warning: no previously-included files matching '*patch*' found anywhere in distribution
warning: no previously-included files matching '*diff*' found anywhere in distribution
warning: no previously-included files matching '.hg' found anywhere in distribution
no previously-included directories found matching 'dist'
done.
running install
running build
running build_py
running build_ext
Traceback (most recent call last):
  File "setup.py", line 493, in <module>
    'rpy2': ['doc/source/rpy2_logo.png', ]}
  File "c:\Python33\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "c:\Python33\lib\distutils\dist.py", line 929, in run_commands
    self.run_command(cmd)
  File "c:\Python33\lib\distutils\dist.py", line 948, in run_command
    cmd_obj.run()
  File "c:\Python33\lib\distutils\command\install.py", line 569, in run
    self.run_command('build')
  File "c:\Python33\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "c:\Python33\lib\distutils\dist.py", line 948, in run_command
    cmd_obj.run()
  File "c:\Python33\lib\distutils\command\build.py", line 126, in run
    self.run_command(cmd_name)
  File "c:\Python33\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "c:\Python33\lib\distutils\dist.py", line 947, in run_command
    cmd_obj.ensure_finalized()
  File "c:\Python33\lib\distutils\cmd.py", line 107, in ensure_finalized
    self.finalize_options()
  File "setup.py", line 152, in finalize_options
    rversion = get_rversion(r_home)
  File "setup.py", line 208, in get_rversion
    if rversion.startswith("WARNING"):
**TypeError: startswith first arg must be bytes or a tuple of bytes, not str**

对我来说,这特别奇怪,因为错误是“TypeError”。另外,所有警告是什么意思?

各种讨论将不胜感激。

非常感谢。

4

1 回答 1

0

RPy 不支持 Python 3.x。您必须使用 2.5 <= Python < 3.0。详见官方文档

于 2013-11-11T09:33:08.917 回答