I am having trouble installing spacyr on R version 4.2. What is strange is that I've used this package in the past just fine. The installation is pretty basic. Per their site you do the following:
install.packages("spacyr")
library("spacyr")
spacy_install()
However, when I run spacy_install()
I get the error: Error: one or more Python packages failed to install [error code 1]
with the traceback:
5.
stop(sprintf(fmt, ...), call. = call.)
4.
stopf(fmt, result)
3.
reticulate::conda_install(envname, packages, pip = pip, conda = conda)
2.
process_spacy_installation_conda(conda, version, lang_models,
python_version, prompt, envname = envname, pip = pip)
1.
spacy_install()
I've tried uninstalling and reinstalling spacyr.
I solved my problem:
I tried more things like install_miniconda()
(see the following code block)
install.packages('spacyr')
spacyr:::install_miniconda()
library(spacyr);spacy_install(prompt = FALSE)
But I was still unable to use spaCy.
I deleted my miniconda folder in my home directory and then ran the above code and I was able to use spaCy.