I want to install rpy2 on my windows machine and it gives me the following famous error
self.convert_pycparser_error(e, csource)
File "c:\users\96171\appdata\local\temp\pip-install-lxsxk7q4\rpy2\.eggs\cffi-1.14.0-py3.6-win-amd64.egg\cffi\cparser.py", line 336, in convert_pycparser_error
raise CDefError(msg)
cffi.CDefError: cannot parse "void __cffi_extern_python_start; void _capsule_finalizer(SEXP); void __cffi_extern_python_stop;"
<cdef source string>:495:96: Illegal character '\r'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\96171\AppData\Local\Temp\pip-install-lxsxk7q4\rpy2\
I have done the following:
- upgraded set up tools
- upgraded pip to the latest version
I have followed the link here for installing rpy2 on windows and they're saying we have to download a precompiled binary in order for this to work.
I have downloaded from the followinf link this wheel:
rpy2‑2.9.5‑cp37‑cp37m‑win_amd64.whl
however I am still facing trouble; I did as follows:
- After I downloaded
rpy2‑2.9.5‑cp37‑cp37m‑win_amd64.whl
- I opened cmd as Administrator in the directory where the wheel is downloaded
- I set
%R_USER%
in the system variables to my username as such: R_USER C:\Users\my_username However I am getting the following error:
ERROR: rpy2-2.9.5-cp37-cp37m-win_amd64.whl is not a supported wheel on this platform.
in the website for the binaries they say that:
Rpy2 (discontinued, unstable): provide access to the R software environment for statistical computing and graphics. Requires R 3.3, and I have R 3.6.2 on my system. Is this causing the error?