Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

there is no package "testthat" #2153

Closed
turgut090 opened this issue May 7, 2019 · 7 comments
Closed

there is no package "testthat" #2153

turgut090 opened this issue May 7, 2019 · 7 comments
Assignees

Comments

@turgut090
Copy link

Hi,
I have just updated R to 3.6.0 version and cannot install lightgbm

The problem is with testthatpackage. I installed that library but when I try to run

Rscript build_r.R

It throws an error: there is no testthat package from the terminal.

Ошибка в library(testthat) :нет пакета под названием ‘testthat’
Выполнение остановлено
R version 3.6.0 (2019-04-26)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Mojave 10.14.4

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] testthat_2.1.0

loaded via a namespace (and not attached):
[1] compiler_3.6.0 magrittr_1.5   R6_2.4.0       tools_3.6.0    rlang_0.3.4   
@jameslamb
Copy link
Collaborator

@henry090 thanks for reporting. I don't understand how that error message and that sessionInfo() could possibly happen together, but I do know I need to do some re-reading on how package installs work in R 3.6.0.

Either way, I have a workaround for you! On advice from @Laurae2 , I put up #2123 to remove all R dependencies not available in common distributions from the build process. Until that PR is reviewed and merged, you could replace your local build.R with that one and I think it should work!

Will you try and let me know?

@turgut090
Copy link
Author

I have all of the libraries... (‘data.table’, ‘Matrix’)

Предупреждение: неизвестная опция ‘--keep_empty-dirs’
* checking for file ‘lightgbm_r/DESCRIPTION’ ... OK
* preparing ‘lightgbm’:
* checking DESCRIPTION meta-information ... OK
* cleaning src
* checking for LF line-endings in source and make files and shell scripts
* checking for empty or unneeded directories
* looking to see if a ‘data/datalist’ file should be added
* building ‘lightgbm_2.2.4.tar.gz’

* installing to library ‘/anaconda3/lib/R/library’
ERROR: dependencies ‘data.table’, ‘Matrix’ are not available for package ‘lightgbm’
* removing ‘/anaconda3/lib/R/library/lightgbm’
Ошибка в .run_shell_command(cmd) :Command failed with exit code: 1
Выполнение остановлено

@Laurae2
Copy link
Contributor

Laurae2 commented May 8, 2019

@jameslamb @henry090 This might be because R is inside Anaconda. Not sure how the R shell behaves inside a conda + macOS environment.

@jameslamb Can you test what happens inside a macOS environment using conda, assuming a precompiled data.table and Matrix packages from conda R repositories?

@turgut090
Copy link
Author

Hi, @Laurae2 .
I removed Anaconda from Mac OS and tried again. It helped! Thank you!

R version 3.6.0 (2019-04-26)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Mojave 10.14.4

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] lightgbm_2.2.4 R6_2.4.0      

loaded via a namespace (and not attached):
[1] compiler_3.6.0    magrittr_1.5      tools_3.6.0       data.table_1.12.2 jsonlite_1.6 

@jameslamb
Copy link
Collaborator

@henry090 wait does that mean it worked? When you say you "removed" Anaconda does that mean you completely uninstalled it, or just moved out of a conda environment into a vanilla R session?

@Laurae2 yes I'll try to reproduce this this week on my Mac. I believe when you use R within a conda environment, packages you installed with install.packages() in a non-conda session will not be found (since they won't be in a library path like /something/miniconda/lib/R/library.

@turgut090
Copy link
Author

@henry090 wait does that mean it worked? When you say you "removed" Anaconda does that mean you completely uninstalled it, or just moved out of a conda environment into a vanilla R session?

"you completely uninstalled it" - Yes.

@jameslamb
Copy link
Collaborator

closing this as I think it's now working. @henry090 thanks for the thorough report. If you are still experiencing problems, please open a new issue.

@lock lock bot locked as resolved and limited conversation to collaborators Mar 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants