Can not install processr and procesR on Windows

痞子三分冷 提交于 2020-03-05 02:19:10

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!