Я сначала создал учетную запись и проект с двигателем Google Earth.install.packages("rgee")
library(rgee)
< /code>
Я проверил, установлен ли Python: < /p>
> reticulate::py_available()
[1] FALSE
< /code>
и установил в мою систему: < /p>
> reticulate::py_discover_config()
python: /usr/bin/python
libpython: /usr/lib64/libpython3.13.so.1.0
pythonhome: //usr://usr
version: 3.13.5 (main, Jun 12 2025, 00:00:00) [GCC 15.1.1 20250521 (Red Hat 15.1.1-2)]
numpy: /usr/lib64/python3.13/site-packages/numpy
numpy_version: 2.2.6
ee: /home/saidmaanan/.local/lib/python3.13/site-packages/ee
NOTE: Python version was forced by use_python() function
> rgee::ee_install_set_pyenv(py_path = "/usr/bin/python", py_env = "rgee")
EARTHENGINE_PYTHON='/usr/bin/python'
EARTHENGINE_ENV='rgee'
saved in: /home/saidmaanan/.Renviron
Do you want restart your R session? Windows users could need to terminate R instead of restarting.
1: yes
2: no
Selection: 1
Restarting R session...
>
< /code>
Я проверил, если все установлено правильно, и это дало мне это: < /p>
> rgee::ee_check()
◉ Python version
✔ [Ok] /usr/bin/python v3.13
Error in strsplit(a, "[.-]") : non-character argument
< /code>
Какова причина этой ошибки? И как мне это обратиться? Выше, и продолжил следующее: < /p>
> rgee:::ee_check_python_packages()
◉ Python packages:
✔ [Ok] numpy
✔ [Ok] earthengine-api
NOTE: The Earth Engine Python API version 1.5.24 is installed
correctly in the system but rgee was tested using the version
0.1.370. To avoid possible issues, we recommend install the
version used by rgee (0.1.370). You might use:
* rgee::ee_install_upgrade()
* reticulate::py_install('earthengine-api==0.1.370', envname='PUT_HERE_YOUR_PYENV')
* pip install earthengine-api==0.1.370 (Linux and Mac0S)
* conda install earthengine-api==0.1.370 (Linux, Mac0S, and Windows)
>
> rgee:::ee_check_credentials()
◉ Credentials neccesaries for rgee:
✔ [Ok] Earth Engine Credentials found.
✔ [Ok] Google Drive credentials found.
✔ [Ok] Google Cloud Storage credentials found.
>
< /code>
Но затем при инициализации двигателя Земли я наткнулся на другую ошибку: < /p>
> # initialize Earth Engine
> rgee::ee_Initialize(
+ user = "[email protected]"
+ )
── rgee 1.1.7 ────────────────────────────────────────────────────────────────────────────────────────── earthengine-api 1.5.24 ──
✔ user: [email protected]
✔ Initializing Google Earth Engine: DONE!
Error in value[[3L]](cond) :
It looks like your EE credential has expired. Try running ee_Authenticate() again or clean your credentials ee_clean_user_credentials().
< /code>
Я попытался повторноментировать свои учетные данные, но ошибка сохраняется: < /p>
> rgee::ee_clean_user_credentials(user = "[email protected]")
> # initialize Earth Engine
> rgee::ee_Initialize(
+ user = "[email protected]"
── rgee 1.1.7 ────────────────────────────────────────────────────────────────────────────────────────── earthengine-api 1.5.24 ──
✔ user: [email protected]
✔ Initializing Google Earth Engine:
Opening in existing browser session.
Enter verification code: 4/1AVMBsJjrMNc8YFpydvgq9xzJtHurdWOFt5hw7MqTdkWOPgE9cB2_nvYBSSg
To authorize access needed by Earth Engine, open the following URL in a web browser and follow the instructions. If the web browser does not start automatically, please manually browse the URL below.
https://code.earthengine.google.com/cli ... h3tpT3aDNo
The authorization workflow will generate a code, which you should paste in the box below.
✔ Initializing Google Earth Engine: DONE!
Successfully saved authorization token.
Error in value[[3L]](cond) :
It looks like your EE credential has expired. Try running ee_Authenticate() again or clean your credentials ee_clean_user_credentials().
Подробнее здесь: https://stackoverflow.com/questions/797 ... ee-package
R: Как правильно установить и использовать пакет RGEE? ⇐ Python
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение