ropensci / MODIStsp

An "R" package for automatic download and preprocessing of MODIS Land Products Time Series
https://docs.ropensci.org/MODIStsp
GNU General Public License v3.0
155 stars 51 forks source link

Modistsp #207

Closed Cryo2018 closed 4 years ago

Cryo2018 commented 4 years ago

Hi, I have a problem when I am running MODIStsp() image I did all of the procedure. R output when I choose 1: image

. I appreciate it if you let me know what should I do for the problem.

Cheers, Ali

lbusett commented 4 years ago

As suggested, try first of all:

install.packages(c("gWidgets" , "gWidgetsRGtk2"))

Lorenzo

dkhramov commented 4 years ago

Hi!

I've try:

install.packages(c("gWidgets" , "gWidgetsRGtk2"))

and got:

Warning in install.packages :
  packages ‘gWidgets’, ‘gWidgetsRGtk2’ are not available (for R version 4.0.0)
lbusett commented 4 years ago

Ok. those packages were recently archived, unfortunately. You can try installing them from CRAN archive using

remotes::install_version("gWidgets", version = "0.0-54.2") remotes::install_version("gWidgetsRGtk2", version = "0.0-86.1")

As soon as I find the time, I'll have to substitute those dependencies with something else, but it is not straightforward, unfortunately,

dkhramov commented 4 years ago

Thank you!

Cryo2018 commented 4 years ago

Unfortunately, It didn't work. Do you have any suggestions for the R version?

Cryo2018 commented 4 years ago

image

lbusett commented 4 years ago

@Cryo2018

Apparently, you did install gWidgets, but not gWidgetsRgtk2 (you have gWidgets2RGtk2, which is a different package). Could you try again installing gWidgetsRgtk2 with

remotes::install_version("gWidgetsRGtk2", version = "0.0-86.1")

ChrisMwene commented 4 years ago

This is what I got after your suggestion

remotes::install_version("gWidgetsRGtk2", version = "0.0-86.1") Error in loadNamespace(name) : there is no package called ‘remotes’

@Cryo2018

Apparently, you did install gWidgets, but not gWidgetsRgtk2 (you have gWidgets2RGtk2, which is a different package). Could you try again installing gWidgetsRgtk2 with

remotes::install_version("gWidgetsRGtk2", version = "0.0-86.1")

lbusett commented 4 years ago

Ok... You need to install the remotes package beforehand.

install.packages("remotes")

ChrisMwene commented 4 years ago

Ok... You need to install the remotes package beforehand.

install.packages("remotes")

Thank you....have successfully installed gWidgets, unfortunately gWidgetsRGtk2 didn't, this is the error I am getting:

Error: package or namespace load failed for 'RGtk2': .onLoad failed in loadNamespace() for 'RGtk2', details: call: NULL error: node stack overflow Error : package 'RGtk2' could not be loaded Error: loading failed Execution halted *** arch - x64 ERROR: loading failed for 'i386'

lbusett commented 4 years ago

On a fresh R session, what do you get from

install.packages("RGtk2") ?

ChrisMwene commented 4 years ago

RGtk2 was already previously installed, tried to reinstall it, this is what i get

R version 4.0.2 (2020-06-22) -- "Taking Off Again" Copyright (C) 2020 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R.

[Workspace loaded from ~/.RData]

install.packages("RGtk2") WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/ Installing package into ‘C:/Users/Chris/Documents/R/win-library/4.0’ (as ‘lib’ is unspecified) trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/RGtk2_2.20.36.zip' Content type 'application/zip' length 16529627 bytes (15.8 MB) downloaded 15.8 MB

package ‘RGtk2’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in C:\Users\Chris\AppData\Local\Temp\RtmpgPkf4n\downloaded_packages

lbusett commented 4 years ago

Ok, didi you try installing RTools following instructions in

https://cran.rstudio.com/bin/windows/Rtools/

?

ChrisMwene commented 4 years ago

i might have missed this...on it right now. i hope I will be able to install gWidgetsRGtk2 after this

ChrisMwene commented 4 years ago

have installed RTools, Installed RGtk2 and GTK+ after loading RGtk2 tried to install gWidgetsRGtk2 using: remotes::install_version("gWidgetsRGtk2", version = "0.0-86.1") unfortunately am getting the same error even after restarting R and adding it (GTK+) on my PATH environment variable

remotes::install_version("gWidgetsRGtk2", version = "0.0-86.1") Downloading package from url: https://cran.rstudio.com//src/contrib/Archive/gWidgetsRGtk2/gWidgetsRGtk2_0.0-86.1.tar.gz Skipping 1 packages not available: gWidgets Installing package into ‘C:/Users/Chris/Documents/R/win-library/4.0’ (as ‘lib’ is unspecified)

  • installing source package 'gWidgetsRGtk2' ... package 'gWidgetsRGtk2' successfully unpacked and MD5 sums checked using staged installation R inst byte-compile and prepare package for lazy loading help installing help indices converting help for package 'gWidgetsRGtk2' finding HTML links ... done as.gWidgetsRGtk2 html
    gWidgetsRGtk2-misc html
    gWidgetsRGtk2-package html
    gWidgetsRGtk2-undocumented html
    building package indices testing if installed package can be loaded from temporary location
    arch - i386 Warning: Failed to load RGtk2 dynamic library, attempting to install it. Please install GTK+ from http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.22/gtk+-bundle_2.22.1-20101227_win32.zip If the package still does not load, please ensure that GTK+ is installed and that it is on your PATH environment variable IN ANY CASE, RESTART R BEFORE TRYING TO LOAD THE PACKAGE AGAIN Error in inDL(x, as.logical(local), as.logical(now), ...) : unable to load shared object 'C:/Users/Chris/Documents/R/win-library/4.0/RGtk2/libs/i386/RGtk2.dll': LoadLibrary failure: The specified module could not be found.

Warning: Failed to load RGtk2 dynamic library, attempting to install it. Please install GTK+ from http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.22/gtk+-bundle_2.22.1-20101227_win32.zip If the package still does not load, please ensure that GTK+ is installed and that it is on your PATH environment variable IN ANY CASE, RESTART R BEFORE TRYING TO LOAD THE PACKAGE AGAIN Error in inDL(x, as.logical(local), as.logical(now), ...) : unable to load shared object 'C:/Users/Chris/Documents/R/win-library/4.0/RGtk2/libs/i386/RGtk2.dll': LoadLibrary failure: The specified module could not be found.

Warning: Failed to load RGtk2 dynamic library, attempting to install it. Please install GTK+ from http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.22/gtk+-bundle_2.22.1-20101227_win32.zip If the package still does not load, please ensure that GTK+ is installed and that it is on your PATH environment variable IN ANY CASE, RESTART R BEFORE TRYING TO LOAD THE PACKAGE AGAIN Error in inDL(x, as.logical(local), as.logical(now), ...) : unable to load shared object 'C:/Users/Chris/Documents/R/win-library/4.0/RGtk2/libs/i386/RGtk2.dll': LoadLibrary failure: The specified module could not be found.

Warning: Failed to load RGtk2 dynamic library, attempting to install it. Please install GTK+ from http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.22/gtk+-bundle_2.22.1-20101227_win32.zip If the package still does not load, please ensure that GTK+ is installed and that it is on your PATH environment variable IN ANY CASE, RESTART R BEFORE TRYING TO LOAD THE PACKAGE AGAIN Error in match.fun(FUN) : node stack overflow Warning: Failed to load RGtk2 dynamic library, attempting to install it. Please install GTK+ from http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.22/gtk+-bundle_2.22.1-20101227_win32.zip If the package still does not load, please ensure that GTK+ is installed and that it is on your PATH environment variable IN ANY CASE, RESTART R BEFORE TRYING TO LOAD THE PACKAGE AGAIN Error : node stack overflow Warning: Failed to load RGtk2 dynamic library, attempting to install it. Please install GTK+ from http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.22/gtk+-bundle_2.22.1-20101227_win32.zip If the package still does not load, please ensure that GTK+ is installed and that it is on your PATH environment variable IN ANY CASE, RESTART R BEFORE TRYING TO LOAD THE PACKAGE AGAIN Error: package or namespace load failed for 'RGtk2': .onLoad failed in loadNamespace() for 'RGtk2', details: call: NULL error: node stack overflow Error : package 'RGtk2' could not be loaded Error: loading failed Execution halted *** arch - x64 ERROR: loading failed for 'i386'

Ok, didi you try installing RTools following instructions in

https://cran.rstudio.com/bin/windows/Rtools/

?

lbusett commented 4 years ago

Ok. Can yiu try restarting r and then

library(gWidgetsRGtk2)

?

lbusett commented 4 years ago

This is teicky... I have the package correctly installed on both r 3.6 an 4.0...

Did you restart windows after adding the Environment variable?

On Fri, 10 Jul 2020, 13:40 bakhri, notifications@github.com wrote:

have installed RTools, Installed RGtk2 and GTK+ after loading RGtk2 tried to install gWidgetsRGtk2 using: remotes::install_version("gWidgetsRGtk2", version = "0.0-86.1") unfortunately am getting the same error even after restarting R and adding it (GTK+) on my PATH environment variable

remotes::install_version("gWidgetsRGtk2", version = "0.0-86.1") Downloading package from url: https://cran.rstudio.com//src/contrib/Archive/gWidgetsRGtk2/gWidgetsRGtk2_0.0-86.1.tar.gz Skipping 1 packages not available: gWidgets Installing package into ‘C:/Users/Chris/Documents/R/win-library/4.0’ (as ‘lib’ is unspecified)

  • installing source package 'gWidgetsRGtk2' ... package 'gWidgetsRGtk2' successfully unpacked and MD5 sums checked using staged installation R inst byte-compile and prepare package for lazy loading help installing help indices converting help for package 'gWidgetsRGtk2' finding HTML links ... done as.gWidgetsRGtk2 html gWidgetsRGtk2-misc html gWidgetsRGtk2-package html gWidgetsRGtk2-undocumented html building package indices testing if installed package can be loaded from temporary location arch - i386 Warning: Failed to load RGtk2 dynamic library, attempting to install it. Please install GTK+ from http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.22/gtk+-bundle_2.22.1-20101227_win32.zip If the package still does not load, please ensure that GTK+ is installed and that it is on your PATH environment variable IN ANY CASE, RESTART R BEFORE TRYING TO LOAD THE PACKAGE AGAIN Error in inDL(x, as.logical(local), as.logical(now), ...) : unable to load shared object 'C:/Users/Chris/Documents/R/win-library/4.0/RGtk2/libs/i386/RGtk2.dll': LoadLibrary failure: The specified module could not be found.

Warning: Failed to load RGtk2 dynamic library, attempting to install it. Please install GTK+ from http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.22/gtk+-bundle_2.22.1-20101227_win32.zip If the package still does not load, please ensure that GTK+ is installed and that it is on your PATH environment variable IN ANY CASE, RESTART R BEFORE TRYING TO LOAD THE PACKAGE AGAIN Error in inDL(x, as.logical(local), as.logical(now), ...) : unable to load shared object 'C:/Users/Chris/Documents/R/win-library/4.0/RGtk2/libs/i386/RGtk2.dll': LoadLibrary failure: The specified module could not be found.

Warning: Failed to load RGtk2 dynamic library, attempting to install it. Please install GTK+ from http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.22/gtk+-bundle_2.22.1-20101227_win32.zip If the package still does not load, please ensure that GTK+ is installed and that it is on your PATH environment variable IN ANY CASE, RESTART R BEFORE TRYING TO LOAD THE PACKAGE AGAIN Error in inDL(x, as.logical(local), as.logical(now), ...) : unable to load shared object 'C:/Users/Chris/Documents/R/win-library/4.0/RGtk2/libs/i386/RGtk2.dll': LoadLibrary failure: The specified module could not be found.

Warning: Failed to load RGtk2 dynamic library, attempting to install it. Please install GTK+ from http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.22/gtk+-bundle_2.22.1-20101227_win32.zip If the package still does not load, please ensure that GTK+ is installed and that it is on your PATH environment variable IN ANY CASE, RESTART R BEFORE TRYING TO LOAD THE PACKAGE AGAIN Error in match.fun(FUN) : node stack overflow Warning: Failed to load RGtk2 dynamic library, attempting to install it. Please install GTK+ from http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.22/gtk+-bundle_2.22.1-20101227_win32.zip If the package still does not load, please ensure that GTK+ is installed and that it is on your PATH environment variable IN ANY CASE, RESTART R BEFORE TRYING TO LOAD THE PACKAGE AGAIN Error : node stack overflow Warning: Failed to load RGtk2 dynamic library, attempting to install it. Please install GTK+ from http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.22/gtk+-bundle_2.22.1-20101227_win32.zip If the package still does not load, please ensure that GTK+ is installed and that it is on your PATH environment variable IN ANY CASE, RESTART R BEFORE TRYING TO LOAD THE PACKAGE AGAIN Error: package or namespace load failed for 'RGtk2': .onLoad failed in loadNamespace() for 'RGtk2', details: call: NULL error: node stack overflow Error : package 'RGtk2' could not be loaded Error: loading failed Execution halted *** arch - x64 ERROR: loading failed for 'i386'

  • removing 'C:/Users/Chris/Documents/R/win-library/4.0/gWidgetsRGtk2' Error: Failed to install 'unknown package' from URL: (converted from warning) installation of package ‘C:/Users/Chris/AppData/Local/Temp/Rtmpum4Lhh/remotes1e0455c8115e/gWidgetsRGtk2’ had non-zero exit status

Ok, didi you try installing RTools following instructions in

https://cran.rstudio.com/bin/windows/Rtools/

?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ropensci/MODIStsp/issues/207#issuecomment-656630799, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABCF3DLCF3BJW4WTVEA4NC3R234Z3ANCNFSM4N2XMZWA .

lbusett commented 4 years ago

Regarding environment variables, on my win10 machine I have gtk installed in

C:/GTK/bin

and then, in my windows "Path" environment variables I have this:

image

ChrisMwene commented 4 years ago

Ok. Can yiu try restarting r and then

library(gWidgetsRGtk2)

?

this is what I get

library(gWidgetsRGtk2) Error in library(gWidgetsRGtk2) : there is no package called ‘gWidgetsRGtk2’

ChrisMwene commented 4 years ago

Regarding environment variables, on my win10 machine I have gtk installed in

C:/GTK/bin

and then, in my windows "Path" environment variables I have this:

image

I cant locate GTK on my C:\

ChrisMwene commented 4 years ago

after library(RGtk2) i get this Error in inDL(x, as.logical(local), as.logical(now), ...) : unable to load shared object 'C:/Users/Chris/Documents/R/win-library/4.0/RGtk2/libs/x64/RGtk2.dll': LoadLibrary failure: The specified module could not be found.

Capture2 Capture

trying to install GTK+ i get this error

trying URL 'http://ftp.gnome.org/pub/gnome/binaries/win64/gtk+/2.22/gtk+-bundle_2.22.1-20101229_win64.zip' Content type 'application/zip' length 25830230 bytes (24.6 MB) downloaded 23.6 MB

Learn more about GTK+ at http://www.gtk.org If the package still does not load, please ensure that GTK+ is installed and that it is on your PATH environment variable IN ANY CASE, RESTART R BEFORE TRYING TO LOAD THE PACKAGE AGAIN Error in inDL(x, as.logical(local), as.logical(now), ...) : unable to load shared object 'C:/Users/Chris/Documents/R/win-library/4.0/RGtk2/libs/x64/RGtk2.dll': LoadLibrary failure: The specified module could not be found.

In addition: Warning messages: 1: Failed to load RGtk2 dynamic library, attempting to install it. 2: In download.file(dep_url, path, mode = "wb") : downloaded length 25770208 != reported length 25830230 3: In dir.create(gtk_path, recursive = TRUE) : 'C:\Users\Chris\Documents\R\win-library\4.0\RGtk2\gtk\x64' already exists 4: In unzip(path, exdir = gtk_path) : error 1 in extracting from zip file 5: In dir.create(config_path, recursive = TRUE) : 'C:\Users\Chris\Documents\R\win-library\4.0\RGtk2\gtk\x64\etc\gtk-2.0' already exists trying URL 'http://ftp.gnome.org/pub/gnome/binaries/win64/gtk+/2.22/gtk+-bundle_2.22.1-20101229_win64.zip' Content type 'application/zip' length 25830230 bytes (24.6 MB) downloaded 24.6 MB

Learn more about GTK+ at http://www.gtk.org If the package still does not load, please ensure that GTK+ is installed and that it is on your PATH environment variable IN ANY CASE, RESTART R BEFORE TRYING TO LOAD THE PACKAGE AGAIN Warning messages: 1: Failed to load RGtk2 dynamic library, attempting to install it. 2: In dir.create(gtk_path, recursive = TRUE) : 'C:\Users\Chris\Documents\R\win-library\4.0\RGtk2\gtk\x64' already exists 3: In dir.create(config_path, recursive = TRUE) : 'C:\Users\Chris\Documents\R\win-library\4.0\RGtk2\gtk\x64\etc\gtk-2.0' already exists

lbusett commented 4 years ago

@ChrisMwene

1) Did you try loading RGtk library after restarting R ?

2) if, so, Let's try something different: Can you try downloading GTK from here:

http://ftp.gnome.org/pub/gnome/binaries/win64/gtk+/2.22/gtk+-bundle_2.22.1-20101229_win64.zip

Decompress and install in a folder of your choice, then add the "bin" subfolder of installation folder to your path, restart Win and try installing RGTk again

Lorenzo

lbusett commented 4 years ago

Instructions also here:

https://docs.ropensci.org/MODIStsp/articles/installation.html#installing-on-windows

ChrisMwene commented 4 years ago

Have installed gWidgetsRGtk2 and MODIStsp is working now. much appreciated @lbusett

lbusett commented 4 years ago

Good. Can I ask you what "did the trick", so that other user can benefit also?

ChrisMwene commented 4 years ago

It was simply not following instructions given here:

  1. Please install GTK+ from http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.22/gtk+-bundle_2.22.1-20101227_win32.zip

  2. If the package still does not load, please ensure that GTK+ is installed and that it is on your PATH environment variable IN ANY CASE, RESTART R BEFORE TRYING TO LOAD THE PACKAGE AGAIN

and avoid multiple GTK+ paths in your environment variable

lbusett commented 4 years ago

In the new version of MODIStsp the gwidgets GUI has been replaced by a new one basedo on Shiny, so this won't be a problem anymore. Closing here.