I am trying to load a language model in spaCy, but I get errors when I try to install the model, both in the legacy command and the newer command.
Installing via the legacy shortname:
python -m spacy download en
Traceback (most recent call last):
File "C:\Users\mikkelson\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 188, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "C:\Users\mikkelson\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 147, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "C:\Users\mikkelson\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 111, in _get_module_details
__import__(pkg_name)
File "C:\Users\mikkelson\AppData\Local\Programs\Python\Python39\lib\site-packages\spacy\__init__.py", line 13, in <module>
from . import pipeline # noqa: F401
File "C:\Users\mikkelson\AppData\Local\Programs\Python\Python39\lib\site-packages\spacy\pipeline\__init__.py", line 1, in <module>
from .attributeruler import AttributeRuler
File "C:\Users\mikkelson\AppData\Local\Programs\Python\Python39\lib\site-packages\spacy\pipeline\attributeruler.py", line 6, in <module>
from .pipe import Pipe
File "spacy\pipeline\pipe.pyx", line 1, in init spacy.pipeline.pipe
ImportError: DLL load failed while importing strings: The specified module could not be found.
Installing using the newer full name:
python -m spacy download en_core_web_sm
Traceback (most recent call last):
File "C:\Users\mikkelson\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 188, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "C:\Users\mikkelson\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 147, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "C:\Users\mikkelson\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 111, in _get_module_details
__import__(pkg_name)
File "C:\Users\mikkelson\AppData\Local\Programs\Python\Python39\lib\site-packages\spacy\__init__.py", line 13, in <module>
from . import pipeline # noqa: F401
File "C:\Users\mikkelson\AppData\Local\Programs\Python\Python39\lib\site-packages\spacy\pipeline\__init__.py", line 1, in <module>
from .attributeruler import AttributeRuler
File "C:\Users\mikkelson\AppData\Local\Programs\Python\Python39\lib\site-packages\spacy\pipeline\attributeruler.py", line 6, in <module>
from .pipe import Pipe
File "spacy\pipeline\pipe.pyx", line 1, in init spacy.pipeline.pipe
ImportError: DLL load failed while importing strings: The specified module could not be found.
Python 3.9 is installed via anaconda, spaCy v 3.0.6 is installed via pip, and I'm in Windows environment. How can I fix this?