mrc-ide / odin

ᚩ A DSL for describing and solving differential equations in R
https://mrc-ide.github.io/odin
Other
102 stars 12 forks source link

howinstall model #308

Closed whzhuscu closed 9 months ago

whzhuscu commented 9 months ago

Sorry, a silly question. I've consulted this question before. The version of packages is the most recent:

> packageVersion('odin')
[1] ‘1.5.6’
> packageVersion('odin.dust')
[1] ‘0.3.9’
> packageVersion('dust')
[1] ‘0.15.1’
> packageVersion('mcstate')
[1] ‘0.9.18’

But when I run the code:

gen <- odin::odin({
  ylag <- delay(y, tau)
  initial(y) <- 0.5
  deriv(y) <- 0.2 * ylag * 1 / (1 + ylag^10) - 0.1 * y
  tau <- user(10)
  output(ylag) <- ylag
})

there is error:

Generating model in c
ℹ Re-compiling odin58a9525b (debug build)
── R CMD INSTALL ─────────────────────────────────────────────────────────────────────────
─  installing *source* package 'odin58a9525b' ...
   ** using staged installation
   ** libs
   make: "C:\Users\中\AppData\Local\Temp\RtmpEdvZxx\file696423361cb2": No such file or directory
   make: *** No rule to make target '"C:\Users\中\AppData\Local\Temp\RtmpEdvZxx\file696423361cb2"'.  Stop.
   ERROR: compilation failed for package 'odin58a9525b'
─  removing 'C:/Users/中/AppData/Local/Temp/RtmpEdvZxx/devtools_install_696416c66226/odin58a9525b'
Error in `(function (command = NULL, args = character(), error_on_status = TRUE, …`:
! System command 'Rcmd.exe' failed
---
Exit status: 1
stdout & stderr: <printed>
---
Type .Last.error to see the more details.

You gave me an answer before, but I still can't solve it. https://github.com/mrc-ide/odin/issues/304 Thanks!

richfitz commented 9 months ago

You have not installed the build tools that you need in order to compile C or C++ code, see the issue here where you asked this last time: https://github.com/mrc-ide/odin/issues/304

whzhuscu commented 9 months ago

Thanks!

whzhuscu commented 9 months ago

Sorry, I am poor at building computer environment.