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

Long long time to install default libraries #119

Open
ghtmtt opened this issue Jan 5, 2023 · 2 comments
Open

Long long time to install default libraries #119

ghtmtt opened this issue Jan 5, 2023 · 2 comments

Comments

@ghtmtt
Copy link
Contributor

ghtmtt commented Jan 5, 2023

I tried with a new QGIS profile as well, but when running one of the example script (like scatterplot), the plugin wants to install these packages:

R execution console output
Installing package into ‘/home/matteo/.local/share/QGIS/QGIS3/profiles/matteo/processing/rlibs’
(as ‘lib’ is unspecified)
also installing the dependencies ‘sys’, ‘askpass’, ‘colorspace’, ‘geometries’, ‘jsonify’, ‘rapidjsonr’, ‘sfheaders’, ‘commonmark’, ‘gridExtra’, ‘systemfonts’, ‘promises’, ‘rappdirs’, ‘proxy’, ‘lazyeval’, ‘curl’, ‘mime’, ‘openssl’, ‘farver’, ‘labeling’, ‘munsell’, ‘stringi’, ‘fastmap’, ‘geojsonsf’, ‘crosstalk’, ‘markdown’, ‘viridis’, ‘leaflet.providers’, ‘brew’, ‘svglite’, ‘uuid’, ‘plyr’, ‘httpuv’, ‘bit’, ‘sass’, ‘cachem’, ‘timechange’, ‘goftest’, ‘tensor’, ‘rprojroot’, ‘fs’, ‘diffobj’, ‘rematch2’, ‘dichromat’, ‘XML’, ‘e1071’, ‘digest’, ‘jsonlite’, ‘rex’, ‘httr’, ‘crayon’, ‘withr’, ‘yaml’, ‘generics’, ‘glue’, ‘lifecycle’, ‘R6’, ‘cli’, ‘gtable’, ‘isoband’, ‘scales’, ‘evaluate’, ‘highr’, ‘stringr’, ‘xfun’, ‘base64enc’, ‘htmltools’, ‘htmlwidgets’, ‘leafem’, ‘leaflet’, ‘leafpop’, ‘png’, ‘satellite’, ‘servr’, ‘webshot’, ‘bit64’, ‘hms’, ‘fansi’, ‘utf8’, ‘later’, ‘bslib’, ‘jquerylib’, ‘tinytex’, ‘lubridate’, ‘plogr’, ‘memoise’, ‘pkgconfig’, ‘spatstat.data’, ‘spatstat.explore’, ‘spatstat.model’, ‘deldir’, ‘polyclip’, ‘spatstat.sparse’, ‘abind’, ‘brio’, ‘callr’, ‘desc’, ‘ellipsis’, ‘pkgload’, ‘praise’, ‘processx’, ‘ps’, ‘waldo’, ‘purrr’, ‘cpp11’, ‘tmaptools’, ‘RColorBrewer’, ‘viridisLite’, ‘widgetframe’, ‘leafsync’, ‘classInt’, ‘DBI’, ‘magrittr’, ‘Rcpp’, ‘s2’, ‘units’, ‘blob’, ‘covr’, ‘dplyr’, ‘ggplot2’, ‘knitr’, ‘lwgeom’, ‘maps’, ‘mapview’, ‘microbenchmark’, ‘odbc’, ‘pbapply’, ‘pillar’, ‘pool’, ‘raster’, ‘rlang’, ‘rmarkdown’, ‘RPostgres’, ‘RPostgreSQL’, ‘RSQLite’, ‘sp’, ‘spatstat’, ‘spatstat.geom’, ‘spatstat.random’, ‘spatstat.linnet’, ‘spatstat.utils’, ‘stars’, ‘terra’, ‘testthat’, ‘tibble’, ‘tidyr’, ‘tidyselect’, ‘tmap’, ‘vctrs’, ‘wk’

and it requires around 50 minutes:

Execution completed in 3106.77 seconds (51 minutes 47 seconds)

I was wondering if all the packages in the list are required.

I'm on a Linux Debian Sid machine and tested with QGIS 3.22 and 3.29 compiled.

@JanCaha
Copy link
Collaborator

JanCaha commented Jan 6, 2023

The issue is that all of these packages are linked via dependencies to sf, raster, stars or sp (which are necessary for plugin to work correctly). I also noticed that the first run last very long, the reason probably is that on the packages that contain some C++ code are compiled, on Windows it should be significantly faster.

One thing that can be done, is to set Options -> Processing -> Providers -> R -> User Library Folder to a folder, that standard R instance uses for library installs (for me it is /home/user/R/x86_64-pc-linux-gnu-library/4.2). That way the normal R installation will share the libs with QGIS (unfortunately that is really hard to properly detect and better to do manually). If the user already has the libs, then the plugin will not install them again. That is so far only reasonable solution that I found.

@ghtmtt
Copy link
Contributor Author

ghtmtt commented Jan 9, 2023

Thanks for the hint. If I'm setting the option to use the system folder over the user one, like this (the path of R is correct):

image

than I cannot open the R algorithms anymore:

image

Is it possible that the algorithms are not opening because in the system folder of R some required packages are missing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants