Невозможно развернуть приложение Django, использующее rpy2, на Heroku

Я хочу развернуть приложение Django, использующее rpy2 на Heroku. Однако при использовании git push heroku master я получаю следующую ошибку:

remote:        Collecting rpy2==3.3.5
remote:          Downloading rpy2-3.3.5.tar.gz (174 kB)
remote:            ERROR: Command errored out with exit status 1:
remote:             command: /app/.heroku/python/bin/python -c 'import sys, setuptools, tokenize;
sys.argv[0] = '"'"'/tmp/pip-install-jnk6jcjm/rpy2/setup.py'"'"';
 __file__='"'"'/tmp/pip-install-jnk6jcjm/rpy2/setup.py'"'"';
f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');
f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-w_5evtsp
remote:                 cwd: /tmp/pip-install-jnk6jcjm/rpy2/
remote:            Complete output (2 lines):
remote:            cffi mode: CFFI_MODE.ANY
remote:            Error: rpy2 in API mode cannot be built without R in the PATH or R_HOME defined. 
Correct this or force ABI mode-only by defining the environment variable RPY2_CFFI_MODE=ABI
remote:            ----------------------------------------
remote:        ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
remote:  !     Push rejected, failed to compile Python app.
remote:
remote:  !     Push failed
remote: Verifying deploy...
remote:
remote: !       Push rejected to hla-algorithm.
remote:
To https://git.heroku.com/hla-algorithm.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/hla-algorithm.git'

Прочитав решение по обнаружение Heroku RPy RHOME, я установил следующие переменные конфигурации, но все же получить ту же ошибку -

  1. ПУТЬ — /app/vendor/R/bin:/app/vendor/gcc-4.3/bin:/app/.heroku/python/bin:/usr/local/bin:/usr/bin:/bin

  2. LD_LIBRARAY_PATH - /usr/lib:/usr/local/lib:/app/vendor/R/lib64/R/modules:/app/vendor/R/lib64/R/lib:/app/vendor/gcc-4.3/lib64

Я пытался использовать несколько разных пакетов сборки, таких как -

  1. https://github.com/virtualstaticvoid/heroku-buildpack-r.git но я получил следующую ошибку:
remote: -----> App not compatible with buildpack: https://github.com/virtualstaticvoid/heroku-buildpack-r.git
  1. https://github.com/ddimmery/heroku-buildpack-python.git но я получил следующую ошибку:
remote: cp: cannot stat '/tmp/build_59b7fa1d/vendor/.apt/*': No such file or directory

person Anjali    schedule 07.08.2020    source источник