我正在尝试运行一个使用 Python 和 R 的 multipack Heroku 应用程序。我首先安装了 R 的 multi buildpack,但是尽管我对 $PATH 进行了修改,但 RPy 的安装无法找到 R。这里发生了什么?当 init.r 运行时,R 将 RHOME 视为“/app/vendor/R/lib64/R”。
-----> Fetching custom git buildpack... done
-----> Multipack app detected
=====> Downloading Buildpack: https://github.com/virtualstaticvoid/heroku-buildpack-r
=====> Detected Framework: R
Vendoring R 2.15.1
Downloading and unpacking R binaries
Executing init.r script
[1] "/app/vendor/R/lib64/R" #This is me dumping out RHOME from init.r
R 2.15.1 successfully installed
=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-python
=====> Detected Framework: Python
-----> No runtime.txt provided; assuming python-2.7.4.
-----> Using Python runtime (python-2.7.4)
-----> Installing dependencies using Pip (1.3.1)
Downloading/unpacking rpy2==2.3.5 (from -r requirements/base.txt (line 22))
Running setup.py egg_info for package rpy2
sh: R: not found
Error: Tried to guess R's HOME but no R command in the PATH.
Complete output from command python setup.py egg_info:
running egg_info
creating pip-egg-info/rpy2.egg-info
writing pip-egg-info/rpy2.egg-info/PKG-INFO
writing top-level names to pip-egg-info/rpy2.egg-info/top_level.txt
writing dependency_links to pip-egg-info/rpy2.egg-info/dependency_links.txt
writing manifest file 'pip-egg-info/rpy2.egg-info/SOURCES.txt'
warning: manifest_maker: standard file '-c' not found
sh: R: not found
Error: Tried to guess R's HOME but no R command in the PATH.
----------------------------------------
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-u32629/rpy2
Storing complete log in /app/.pip/pip.log
! Heroku push rejected, failed to compile Multipack app
To git@heroku.com:D.git
! [remote rejected] master -> master (pre-receive hook declined)
(venvddd)ben@Watt:~/Projects/D/D$ heroku config:get PATH /home/ben/Projects/D/venvddd/bin:/usr/local/heroku/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/app/vendor/R/lib64/R:/app/vendor/R/lib64/R/bin