Installing necessary python modules to an environment
Source:R/install_and_config.R
install_py_modules.RdFunction for installing the necessary python modules.
Usage
install_py_modules(
envname = "aifeducation",
transformer_version = "<=4.56.1",
tokenizers_version = "<=0.22.0",
pandas_version = "<=2.3.2",
datasets_version = "<=3.6.0",
codecarbon_version = "<=3.0.4",
safetensors_version = "<=0.6.2",
torcheval_version = "<=0.0.7",
accelerate_version = "<=1.10.1",
calflops_version = "<=0.3.2",
pytorch_cuda_version = "12.9",
python_version = "3.12",
remove_first = FALSE,
use_conda = FALSE
)Arguments
- envname
stringName of the environment where the packages should be installed.- transformer_version
stringdetermining the desired version of the python library 'transformers'.- tokenizers_version
stringdetermining the desired version of the python library 'tokenizers'.- pandas_version
stringdetermining the desired version of the python library 'pandas'.- datasets_version
stringdetermining the desired version of the python library 'datasets'.- codecarbon_version
stringdetermining the desired version of the python library 'codecarbon'.- safetensors_version
stringdetermining the desired version of the python library 'safetensors'.- torcheval_version
stringdetermining the desired version of the python library 'torcheval'.- accelerate_version
stringdetermining the desired version of the python library 'accelerate'.- calflops_version
stringdetermining the desired version of the python library 'calflops'.- pytorch_cuda_version
stringdetermining the desired version of 'cuda' for 'PyTorch'. To install 'PyTorch' without cuda set toNULL.- python_version
stringPython version to use.- remove_first
boolIfTRUEremoves the environment completely before recreating the environment and installing the packages. IfFALSEthe packages are installed in the existing environment without any prior changes.- use_conda
boolIfTRUEuses 'conda' for package management. IfFALSEuses virtual environments for package management.
Value
Returns no values or objects. Function is used for installing the necessary python libraries in a conda environment.
Note
Function tries to identify the type of operating system. In the case that MAC OS is detected 'PyTorch' is installed without support for cuda.
See also
Other Installation and Configuration:
check_aif_py_modules(),
get_recommended_py_versions(),
install_aifeducation(),
install_aifeducation_studio(),
prepare_session(),
set_transformers_logger(),
update_aifeducation()