Declare a shared Python environment for local embeddings and classification
using reticulate::py_require(). This is opt-in: loading huggingfaceR and
using its hosted API functions do not require or initialize Python.
Details
Requires optional reticulate version 1.41.0 or later. Declared requirements
are Python >=3.10,<3.13, transformers >=4.41,<5,
sentence-transformers >=3,<6, huggingface_hub >=0.34,<1,
torch >=2.6,<3, and numpy >=1.26,<3.
Call this before initializing Python. Requirements are resolved lazily by
reticulate when Python is first used. An explicitly selected Python
installation, including RETICULATE_PYTHON, is never overridden. In a
manually managed environment, install these requirements yourself and
restart R after changing the environment. Local download and load operations
check the selected environment's versions using Python package metadata.