在Windows 7,Python 3.3上安装RPy2-2.3.8时出错

时间:2013-11-11 09:10:56

标签: python python-3.x installation rpy2

人。 我正在尝试在 Windows 7 (64位), Python 3.3 上安装 RPy2-2.3.8 ,但是 RPy2 < / strong>似乎有很多安装问题...... :(

我尝试通过在&#34; cmd&#34;上键入&#34; python.exe setup.py install&#34; 来安装RPy2在Windows环境中。

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**

对我而言,它特别奇怪,因为错误是&#34; TypeError。&#34; 另外,所有警告意味着什么?

各种讨论将不胜感激。

非常感谢。

1 个答案:

答案 0 :(得分:0)

RPy不支持Python 3.x.你必须使用2.5&lt; = Python&lt; 3.0。有关详细信息,请参阅official documentation