Error in py_run_file_impl(file, local, convert) : NameError: name '_C' is not defined

96 views Asked by At

I've been using text package on another laptop and everything runs smoothly. However, on a different laptop, I've been trying to install the package -I have reinstall it, reinstall r as well - but when I tried to initialize (textrpp_initialize()), I'am getting the following error:

textrpp python option is already set, text will use:
condaenv = "textrpp_condaenv"
Error in py_run_file_impl(file, local, convert) :
NameError: name '_C' is not defined
Run reticulate::py_last_error() for details.

I run the command for further details, and I get the following information:

Traceback (most recent call last):
File "C:/Users/nelso/AppData/Local/R/win-library/4.3/text/python/huggingface_Interface3.py", line 5, in
import torch
File "C:\Users\nelso\AppData\Local\R\win-library\4.3\reticulate\python\rpytools\loader.py", line 119, in _find_and_load_hook
return _run_hook(name, _hook)
File "C:\Users\nelso\AppData\Local\R\win-library\4.3\reticulate\python\rpytools\loader.py", line 93, in _run_hook
module = hook()
File "C:\Users\nelso\AppData\Local\R\win-library\4.3\reticulate\python\rpytools\loader.py", line 117, in hook
return find_and_load(name, import)
File "C:\Users\nelso\AppData\Local\R-MINI1\envs\TEXTRP1\lib\site-packages\torch_init.py", line 457, in
for name in dir(_C):
NameError: name '_C' is not defined

└─text::textrpp_initialize(...)
└─reticulate::source_python(...)
└─reticulate::py_run_file(file, local = FALSE, convert = convert)
  └─reticulate:::py_run_file_impl(file, local, convert)

Any idea of what it can be? Thank you!

0

There are 0 answers