R package (mirt) cannot be installed during deployment

Hi, this issue has been bothering me for days and I have tried some methods and still no solution.

  1. I failed to use r-cran-mirt in packages.txt and then checked Ubuntu/Debian to find that the package did not seem to be distributed.

  2. I tried subprocess.run([“Rscript”, “install.R”], check=True) which also failed and I was prompted with an unwritable message when I deployed it.

Could I ask what else can be done to solve this issue?

For example uploading a .tgz package to GitHub to install for deployment?

Thank you very much!

I feel like your something like option 2 is still the best way. How does a messge that cannot be written looks like?

Thank you so much for your reply! I am in the process_data.R - install.packages(‘mirt’)

Installing package into ‘/usr/local/lib/R/site-library’

(as ‘lib’ is unspecified)

Warning in install.packages("mirt") :

lib = "/usr/local/lib/R/site-library"' is not writable

Error in install.packages("mirt") : unable to install packages

You have to install to a writable location, probably somewhere in your home directory. I think you do that using the lib paramater to install.packages. I don’t speak much R myself.

2 Likes

Solved! Thank you very much!

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.