CEEU-lab / city_modeller

Urban dynamics performance assessment with data-driven modelling templates
GNU General Public License v3.0
0 stars 0 forks source link

rpy2 installation #44

Closed PyMap closed 11 months ago

PyMap commented 1 year ago

Para instalar rpy2, si r-base no está instalado en el OS, devuelve este error.

     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 149.6/149.6 kB 4.1 MB/s eta 0:00:00
Collecting rpy2==3.5.13 (from city-modeller==0.1.0)
  Downloading rpy2-3.5.13.tar.gz (218 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 218.8/218.8 kB 1.9 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      Unable to determine R home: [Errno 2] No such file or directory: 'R'
      cffi mode is CFFI_MODE.ANY
      Looking for R home with: R RHOME
      Unable to determine R home: [Errno 2] No such file or directory: 'R'
      R home found: None
      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
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.}

Para instalar r-base:

  1. En Mac
  2. En Windows
  3. En Linux

Importante: el binary a descargar es el correspondiente a la release ´4.3.1´ Esto va a permitir que la app levante, pero si se quiere ejecutar la seccion de resultados del macromodeller, es necesario instalar los siguientes paquetes de R:

Estos paquetes se pueden instalar desde la consola de r-base con:

Dockerfile

Agregando esto https://github.com/CEEU-lab/city_modeller/blob/fix/Renv/Dockerfile#L14-L15 al dockerfile la app levanta. Pero no puede correr el macromodeller porque faltan algunas dependencias como tidyverse