安装与到得问题
1.subprocess.CalledProcessError: Command '('D:\\PROGRA~1\\R\\R-35~1.1\\bin\\x64\\R', 'CMD', 'config', '--ldflags')' returned non-zero exit status 1
- Download rpy2‑2.9.3‑cp35‑cp35m‑win_amd64.whl from [uci]: Unofficial Windows Binaries for Python Extension Packages
- https://www.lfd.uci.edu/~gohlke/pythonlibs/#rpy2
- Open a cmd window (as Administrator) in the download dir
- Set %R_USER% env var to current username:
set R_USER=%USERNAME%
pip install rpy2‑2.9.3‑cp35‑cp352m‑win_amd64.whl
(pip's dir must be in %PATH%
2. python - Error: Tried to guess R's HOME but no command (R) in the PATH on OS -
- use
easy_install rpy2
and it works just fine. - http://rpy.sourceforge.net/rpy2/doc-2.2/html/overview.html#download
- Make sure you have
setuptools
installed. - If you do not know how to do that, check this link
- You can just run ez_setup.py and let it decide for you.
-
Add C:\Program Files\R\R-2.12.1\bin\i386 (the path to R.dll) to the environment variable PATH
-
Add an environment variable R_HOME with C:\Program Files\R\R-2.12.1
-
Add an environment variable R_USER with %USERNAME%