Cannot install devtools, need to update processx version

Tried installing devtools package, this is what comes at the end of console message.

I need to upgrade processx to 3.4.0 from 3.3.1 but don't know how to go about it

  • installing source package 'callr' ...
    ** package 'callr' successfully unpacked and MD5 sums checked
    ** using staged installation
    ** R
    ** inst
    ** byte-compile and prepare package for lazy loading
    Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
    namespace 'processx' 3.3.1 is being loaded, but >= 3.4.0 is required
    Calls: ... namespaceImportFrom -> asNamespace -> loadNamespace
    Execution halted
    ERROR: lazy loading failed for package 'callr'
  • removing 'C:/Users/Khandoba Salunkhe/Documents/R/win-library/3.6/callr'
    Warning in install.packages :
    installation of package ‘callr’ had non-zero exit status

I tried installing processx seprately and got this error

Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
namespace 'processx' 3.3.1 is being loaded, but >= 3.4.0 is required
Calls: ... namespaceImportFrom -> asNamespace -> loadNamespace
Execution halted
ERROR: lazy loading failed for package 'callr'

Can anyone help? TIA

1 Like

What is the whole error message that you get when you run

install.packages("processx")
1 Like

@abodnahk Welcome to RStudio Community!

Here are some ideas to try to fix your installation issue:

  1. Restart the R session and retry the installation. You can do this via the RStudio menu "Session" -> "Restart R" or with the keyboard shortcut Ctrl-Shift-F10. This is because sometimes currently loaded packages are unable to be properly uninstalled and upgraded.

  2. Only allow binary package installations. This can sometimes fix issues with very recent releases of packages that don't yet have binaries available. You can do this by running options(pkgType = "binary") before running the installation command.

If neither of these fix the problem, could you please answer the following questions:

  1. What version of R do you have installed? If you are unsure, you can confirm by running R.version.string in the R console.

  2. Which function are you using to try and install the package? install.packages(), install_github(), or something else?

  3. What is your ultimate goal? In other words, why do you need the devtools package installed? For example, if you want to be able to install packages from GitHub, you could alternatively install the package remotes to accomplish this.

I came across this same issue (and found this thread looking for a solution via Google-fu).

Reinstall Rtools (from https://cran.r-project.org/bin/windows/Rtools/).

As mentioned above, devtools was failing due to callr issues, which came from processx. I tried updating processx 3-4 times, but got a "WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:" error.

Once I updated Rtools, everything worked fine.

1 Like

@wizzo45 Good idea! Thanks for sharing your solution. Installing the latest version of Rtools will ensure that the latest versions of the packages can be compiled from source on Windows.

updating Rtools worked. The code is working fine now and finished the assignment i was working on. Thank you so much for your help @wizzo45

1 Like

@jdblischak thank you

1 Like

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