AgrDataSci / ag5Tools

R toolbox to download and extract data from the "Agrometeorological indicators from 1979 to present derived from reanalysis" (AgERA5) dataset.
https://agrdatasci.github.io/ag5Tools/
Other
7 stars 6 forks source link

Unable to run example after installing #4

Open adamhsparks opened 1 year ago

adamhsparks commented 1 year ago

I get an error about a missing Python module after installation. I then tried installing the module with pip, I still get the same error after it successfully installed for me.

  ag5_download(variable = "2m_temperature",
                           statistic = "night_time_minimum",
                           day = "all",
                           month = "all",
                           year = 2015,
                           path = "C:/custom_target_folder"
                           )
List of 20
 $ python              : chr "/opt/homebrew/Cellar/python@3.10/3.10.12_1/bin/python3.10"
 $ libpython           : chr "/opt/homebrew/Cellar/python@3.10/3.10.12_1/Frameworks/Python.framework/Versions/3.10/Python"
 $ pythonhome          : chr "/opt/homebrew/Cellar/python@3.10/3.10.12_1/Frameworks/Python.framework/Versions/3.10:/opt/homebrew/Cellar/pytho"| __truncated__
 $ pythonpath          : chr "/Users/adamsparks/Library/R/arm64/4.3/library/reticulate/config:/opt/homebrew/Cellar/python@3.10/3.10.12_1/Fram"| __truncated__
 $ prefix              : chr "/opt/homebrew/opt/python@3.10/Frameworks/Python.framework/Versions/3.10"
 $ exec_prefix         : chr "/opt/homebrew/opt/python@3.10/Frameworks/Python.framework/Versions/3.10"
 $ base_exec_prefix    : chr "/opt/homebrew/opt/python@3.10/Frameworks/Python.framework/Versions/3.10"
 $ virtualenv          : chr ""
 $ virtualenv_activate : chr ""
 $ version_string      : chr "3.10.12 (main, Jun 20 2023, 19:43:52) [Clang 14.0.3 (clang-1403.0.22.14.1)]"
 $ version             : chr "3.10"
 $ architecture        : chr "64bit"
 $ anaconda            : logi FALSE
 $ conda               : chr "False"
 $ numpy               :List of 2
  ..$ path   : chr "/opt/homebrew/lib/python3.10/site-packages/numpy"
  ..$ version: list()
  .. ..- attr(*, "class")= chr "numeric_version"
 $ required_module     : chr "cdsapi"
 $ required_module_path: NULL
 $ available           : logi TRUE
 $ python_versions     : chr "/opt/homebrew/Cellar/python@3.10/3.10.12_1/bin/python3.10"
 $ forced              : chr "the current process"
 - attr(*, "class")= chr "py_config"
Error: Python module cdsapi was not found.

Detected Python configuration:
adamhsparks commented 1 year ago

FWIW.

─ Session info ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 setting  value
 version  R version 4.3.1 (2023-06-16)
 os       macOS Ventura 13.4.1
 system   aarch64, darwin20
 ui       X11
 language (EN)
 collate  en_AU.UTF-8
 ctype    en_AU.UTF-8
 tz       Australia/Perth
 date     2023-07-17
 pandoc   3.1.5 @ /opt/homebrew/bin/pandoc

─ Packages ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 package     * version date (UTC) lib source
 ag5Tools    * 0.0.1   2022-03-24 [1] CRAN (R 4.3.0)
 askpass       1.1     2019-01-13 [1] CRAN (R 4.3.0)
 cli           3.6.1   2023-03-23 [1] CRAN (R 4.3.0)
 codetools     0.2-19  2023-02-01 [2] CRAN (R 4.3.1)
 credentials   1.3.2   2021-11-29 [1] CRAN (R 4.3.0)
 curl          5.0.1   2023-06-07 [1] CRAN (R 4.3.0)
 jsonlite      1.8.7   2023-06-29 [1] CRAN (R 4.3.0)
 later         1.3.1   2023-05-02 [1] CRAN (R 4.3.0)
 lattice       0.21-8  2023-04-05 [2] CRAN (R 4.3.1)
 Matrix        1.6-0   2023-07-08 [1] CRAN (R 4.3.0)
 openssl       2.1.0   2023-07-15 [1] CRAN (R 4.3.0)
 paint         0.1.7   2023-04-26 [1] Github (MilesMcbain/paint@a7e97dd)
 png           0.1-8   2022-11-29 [1] CRAN (R 4.3.0)
 Rcpp          1.0.11  2023-07-06 [1] CRAN (R 4.3.0)
 reticulate    1.30    2023-06-09 [1] CRAN (R 4.3.0)
 rlang         1.1.1   2023-04-28 [1] CRAN (R 4.3.0)
 rsthemes      0.4.0   2023-04-26 [1] Github (gadenbuie/rsthemes@34a55a4)
 rstudioapi    0.15.0  2023-07-07 [1] CRAN (R 4.3.0)
 sessioninfo   1.2.2   2021-12-06 [1] CRAN (R 4.3.0)
 sys           3.4.2   2023-05-23 [1] CRAN (R 4.3.0)
 terra         1.7-39  2023-06-23 [1] CRAN (R 4.3.0)

 [1] /Users/adamsparks/Library/R/arm64/4.3/library
 [2] /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library
dbrownf commented 11 months ago

Hi Adam (@adamhsparks), apologies for the long delay but I was not receiving notifications. Could you please check what you get after running sessioninfo::python_info()?