rgee
rgee copied to clipboard
Error in loading rgee library
- rgee version: 1.1.3
- R version: 4.1.1
- Operating System: Windows 10 64-bit
I have been happily using rgee with no problems up until yesterday. Today when I tried to load the library I got this error: library(rgee) Error: package or namespace load failed for ‘rgee’: .onLoad failed in loadNamespace() for 'rgee', details: call: py_module_import(module, convert = convert) error: ModuleNotFoundError: No module named 'ee' package ‘rgee’ was built under R version 4.1.3
I checked out my rgee environment in conda and everything looked good (earthengine-api is installed, etc..), so I reinstalled rgee and restarted my R session. Unfortunately, this did not solve the problem and I continue to get the error.
As a note: I updated the earthengine libraries in my conda environment yesterday. Things were working find after the update, so probably not that, but perhaps.
Is anybody else having trouble loading the library??
Hi,
Until recently, everything was working well but now calling library(rgee) brings this error:
Error: package or namespace load failed for ‘rgee’: .onLoad failed in loadNamespace() for 'rgee', details: call: py_module_import(module, convert = convert) error: ModuleNotFoundError: No module named 'ee'
I do not know how to proceed from here.
Kindly help
Hi @ArapKorir sorry for my late reply,
I notice that in some systems if there is NULL pointers related to the EARTH ENGINE PYTHON API in the global environment, rgee return that error (see image below) when it is loaded.
Can you try to delete them before loading rgee?
rgee version 1.1.5 R version 4.2.1 (2022-06-23 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 22621)
Hi, I'm having the same issue. rgee was working fine for days, and then all of a sudden I get this issue. I have removed and reinstalled, restarted R, etc. I have cleared the global environment and still getting the error. Can you help me? Thank you.
Set a Python ENV that has ee ('earthengine-api') "Python" package installed.
library(reticulate)
use_python("/usr/bin/python3.8")
library(rgee)
...
Thanks @csaybar, I have included the full code below. See the following error when running use_python()
. Apologies, I'm pretty new to this...
UPDATE: For others who encounter this, the fix for me was simple: Exit R Studio, open R Studio again, create a totally new project, and open the script in there.
UPDATE: For others who encounter this, the fix for me was simple: Exit R Studio, open R Studio again, create a totally new project, and open the script in there.
It worked! Thank you!
has anyone found a solution that doesn't require creating a new project? It does work but it seems like there must be a better way
Hi I have the same issue. Yesterday it worked perfectly fine and this morning I get this error:
library(rgee) Error: package or namespace load failed for ‘rgee’: .onLoad failed in loadNamespace() for 'rgee', details: call: NULL error: ModuleNotFoundError: No module named 'ee'
Has anyone found a solution? None of the previous solutions worked for me.
Regards