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

R library can't install on windows in Processing #19860

Closed
qgib opened this issue Nov 8, 2014 · 8 comments
Closed

R library can't install on windows in Processing #19860

qgib opened this issue Nov 8, 2014 · 8 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Processing Relating to QGIS Processing framework or individual Processing algorithms
Milestone

Comments

@qgib
Copy link
Contributor

qgib commented Nov 8, 2014

Author Name: Takayuki Mizutani (Takayuki Mizutani)
Original Redmine Issue: 11603
Affected QGIS version: 2.6.0
Redmine category:processing/core
Assignee: Victor Olaya


First running R in processing, it try to install R library (rgdal etc.) in the unwritable folder on windows.
So the error has occured like 'lib="C:/Program Files/R/R-3.1.1/library" is not writable'

For solving this problem, I have added this line in qgis.bat (C:\OSGeo4W\bin\qgis.bat or C:\Program Files\QGIS Brighton\bin\qgis.bat).

REM add this line
set R_LIBS=%HOME%\Documents\R\win-library\3.1

But there is one restriction that it is already exist and writable folder.
Please fix this problem by source code fundamentally.

@qgib
Copy link
Contributor Author

qgib commented May 1, 2015

Author Name: Stefan Blumentrath (@ninsbl)


Sounds like a good (in terms of convenient for the user) solution could be to add the possibility to specify R_LIBS_USER in the options for the R provider. If nothing is specified yet (environment variable is empty), a sub-folder in the Processing folder within the user home could be created and used as a default. Content/path of R_LIBS_USER could be read from environment variables (if the variable is already set). (BTW: a variable in the Processing options for the default cran mirror to be used could be nice too)

On Win 7, users can set their environment variables (without admin rights) permanently like this:
Windows button -> Control panel -> User accounts -> Change my environment variables -> New …
Variable: R_LIBS_USER
Value: “Path to folder where R libraries should be stored” the folder has to exist and has to be writable.
Otherwise, R buries packages somewhere in C:\Users\USERNAME\AppData\Local\temp\A_CRYPICAL_FOLDER_NAME\downloaded_packages
Therefore, setting R_LIBS_USER as an environment variable seems to be a good idea anyway (An ".Renviron" file in the user home did not seem to have effect on Windows (but I tested only swiftly). For further reading see: http://cran.r-project.org/bin/windows/base/rw-FAQ.html)

So, this issue is probably more a question of a properly configured R installation than a real processing issue and an update of the documentation (http://docs.qgis.org/testing/en/docs/user_manual/processing/3rdParty.html) might be sufficient...

@qgib
Copy link
Contributor Author

qgib commented May 3, 2015

Author Name: Stefan Blumentrath (@ninsbl)


Added a preliminary quick fix (comparable to Takayuki Mizutans solution) in #2022
Yet, it has only effect at second start of QGIS, so in future a more elegant solution would be needed...

@qgib
Copy link
Contributor Author

qgib commented May 5, 2015

Author Name: Stefan Blumentrath (@ninsbl)


Please have a look at: #2028 (pull request 2022 has been closed).
This new pull request adds the possibility to define a path for R user libraries on Windows and injects the specified library path into R scripts (using .libPaths() function in R).


  • fixed_version_id was configured as Version 2.8.2

@qgib
Copy link
Contributor Author

qgib commented May 6, 2015

Author Name: Giovanni Manghi (@gioman)


The PR was merged.


  • resolution was changed from to fixed/implemented
  • status_id was changed from Open to Closed

@qgib
Copy link
Contributor Author

qgib commented May 1, 2017

Author Name: Giovanni Manghi (@gioman)


  • regression was configured as 0

@qgib
Copy link
Contributor Author

qgib commented May 1, 2017

Author Name: Giovanni Manghi (@gioman)


  • easy_fix was configured as 0

@qgib
Copy link
Contributor Author

qgib commented May 1, 2017

Author Name: Giovanni Manghi (@gioman)


Some providers are being removed from QGIS/Processing (will be available as plugin) and so are their categories in the bug tracker. To not leave them orphaned of a category they are being reassigned to processing/core.

@qgib
Copy link
Contributor Author

qgib commented May 1, 2017

Author Name: Giovanni Manghi (@gioman)


  • category_id was changed from 124 to Processing/Core

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Processing Relating to QGIS Processing framework or individual Processing algorithms labels May 25, 2019
@qgib qgib added this to the Version 2.8.2 milestone May 25, 2019
@qgib qgib closed this as completed May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Processing Relating to QGIS Processing framework or individual Processing algorithms
Projects
None yet
Development

No branches or pull requests

1 participant