if (FALSE) {
# install the latest version of spaCy
spacy_install()
# update spaCy
spacy_install(force = TRUE)
# install an older version
spacy_install(version = "3.1.0")
# install with GPU enabled
spacy_install(version = "cuda-autodetect")
# install on Apple ARM processors
spacy_install(version = "apple")
# install an old custom version
spacy_install(version = "[cuda-autodetect]==3.2.0")
# install several models with spaCy
spacy_install(lang_models = c("en_core_web_sm", "de_core_news_sm"))
# install spaCy to an existing virtual environment
Sys.setenv(RETICULATE_PYTHON = "path/to/python")
spacy_install()
}
Run the code above in your browser using DataLab