taxonomicallyinformedannotation / tima-r

https://taxonomicallyinformedannotation.github.io/tima-r/
https://taxonomicallyinformedannotation.github.io/tima-r
GNU General Public License v3.0
9 stars 3 forks source link

R version requested is already installed #114

Closed BoryALX closed 5 months ago

BoryALX commented 5 months ago

When trying to install tima-r (via Rscript inst/scripts/install.R) Althought I have R version 4.3.2 installed, I got this message:

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

Loading personal and system profiles took 1361ms.
(base) PS C:\Users\bory> cd GitHub
(base) PS C:\Users\bory\GitHub> git clone https://github.com/taxonomicallyinformedannotation/tima-r.git
Cloning into 'tima-r'...
remote: Enumerating objects: 19388, done.
remote: Counting objects: 100% (10643/10643), done.
remote: Compressing objects: 100% (1995/1995), done.
remote: Total 19388 (delta 8839), reused 9945 (delta 8517), pack-reused 8745 eceiving objects: 100% (19388/19388), 10.25 MiB | 6.67 MiB/s
Receiving objects: 100% (19388/19388), 13.76 MiB | 7.22 MiB/s, done.
Resolving deltas: 100% (15169/15169), done.
(base) PS C:\Users\bory\GitHub> cd tima-r
(base) PS C:\Users\bory\GitHub\tima-r> Rscript inst/scripts/install.R

  There is a binary version available but the source version is later:
         binary source needs_compilation
pkgbuild  1.4.0  1.4.3             FALSE

installing the source package 'pkgbuild'

trying URL 'https://cloud.r-project.org/src/contrib/pkgbuild_1.4.3.tar.gz'
Content type 'application/x-gzip' length 48605 bytes (47 KB)
==================================================
downloaded 47 KB

* installing *source* package 'pkgbuild' ...
** package 'pkgbuild' successfully unpacked and MD5 sums checked
** using staged installation
** R
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (pkgbuild)

The downloaded source packages are in
        'C:\Users\bory\AppData\Local\Temp\RtmpCgIh0w\downloaded_packages'
Loading required package: pkgbuild
No need to install Rtools - You've got the relevant version of Rtools installed

Current version is the latest, no need to update.
v Loading metadata database ... done
x Creating lockfile pkg.lock [6s]
Error:
! error in pak subprocess
Caused by error:
! Could not solve package dependencies:
* deps::.: Needs R >= 4.3.0
---
Backtrace:
1. pak::lockfile_create()
2. pak:::remote(function(...) { ...
3. err$throw(res$error)
---
Subprocess backtrace:
1. base::withCallingHandlers(cli_message = function(msg) { ...
2. get("lockfile_create_internal", asNamespace("pak"))(...)
3. prop$stop_for_solution_error()
4. private$plan$stop_for_solve_error()
5. pkgdepends:::pkgplan_stop_for_solve_error(self, private)
6. base::throw(new_error("Could not solve package dependencies:\n", msg, ...
7. | base::signalCondition(cond)
8. global (function (e) ...
Execution halted
(base) PS C:\Users\bory\GitHub\tima-r> Rscript inst/scripts/install.R
Adafede commented 5 months ago

Hi @BoryALX, thank you for opening the issue!

It might be that your shell is still calling an old R version available somewhere on your machine...

Could you write this into your shell and see if the needed R version (>= 4.3.0 for now) is installed?

Rscript -e "R.version"

Normally installing the latest version should fix the issue, do not hesitate to tell me if this is not the case! 😉

Adafede commented 5 months ago

@BoryALX Any news? Could the issue be solved?

BoryALX commented 5 months ago

Hi, I did install the new version of R and deleted any remaining old version. I launched the script with R directly whithout using "Rscript" and it works. Indeed, the issue is solved. Thank you very much for the great tool ;-)

Adafede commented 5 months ago

Wonderful, in case anyone else is looking how to use Rscript on Windows: https://info201.github.io/r-intro.html#running-r-cmd