问题
Following this question, I am trying to install the package (running R64 as admin on Windows):
devtools::install_github("markhwhiteii/processr")
or
devtools::install_github("cardiomoon/processR")
However, I get the error message:
Error: Failed to install 'processr' from GitHub: (converted from warning) cannot remove prior installation of package 'digest'
no matter which update option I select. Running the command .libPaths()
I found the packages installation folder C:/Program Files/R/R-3.6.2/library
and manually deleted the digest
package and reinstalled it with package.install("digest")
. But I still get the same error! I would appreciate it if you could help me understand what is the problem and how I can resolve it.
回答1:
The simplest solution is to say no when install_github
asks if it should replace digest.
If it still fails for some reason (and I can't see why; neither package requires a specific version of digest and you've reinstalled it in any case), then the problem is that devtools itself uses digest, so it can't be removed as long as devtools is loaded. So you can't use install_github
.
You have a couple of options:
- Clone the repo, then from the command line, run
R CMD INSTALL .
in that directory. Note that you'll need to insert the path to your R executable. - Install from the GitHub archive of the master branch:
install.packages("https://github.com/markhwhiteii/processr/archive/master.tar.gz")
回答2:
The steps to install the markhwhiteii/processr
package:
install.packages("devtools")
library(devtools)
install.packages("https://github.com/markhwhiteii/processr/archive/master.tar.gz")
for testing the instalation:
library(processr)
processr::model1
Sent a PR on the GitHub repo.
and if you want to run R in the Jupyter environment just follow the instructions to install and regsiter the kernel:
install.packages('IRkernel')
IRkernel::installspec()
来源:https://stackoverflow.com/questions/60296207/can-not-install-processr-and-procesr-on-windows