Question

guys. I'am trying to installing RPy2-2.3.8 on Windows 7 (64bit), Python 3.3, but RPy2 seems to have quite a lot of installation problems...:(

I tried to install RPy2 by typing "python.exe setup.py install" on "cmd" on windows environment.

R version 3.0.2 was successfully installed and the path of it was added on environment variable.

However, the following error occurred. Can anybody tell what does this error mean?

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

For me it's especially weird because the error is "TypeError." Plus, what does all the warnings mean?

All kinds of discussion will be appreciated.

Many thanks.

Was it helpful?

Solution

RPy does not support Python 3.x. You have to use 2.5 <= Python < 3.0. See official documentation for details.

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