1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Python] python - spaCy module won't import

Discussão em 'Python' iniciado por Stack, Setembro 13, 2024.

  1. Stack

    Stack Membro Participativo

    I recently tried to install the spaCy module for python 3.x. The installation looks like it runs successfully (shows no errors), but when I try to import spaCy, or when I try to install spaCy models, I get the error below. I have tried installing spaCy using both pip install and conda install, and I have tried forcing a reinstall of numpy.

    Traceback (most recent call last):
    File "C:\ProgramData\Anaconda3\lib\site-packages\numpy\core\__init__.py",
    line 16, in <module>
    from . import multiarray
    ImportError: DLL load failed: The specified procedure could not be found.

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "C:\ProgramData\Anaconda3\lib\runpy.py", line 183, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
    File "C:\ProgramData\Anaconda3\lib\runpy.py", line 142, in _get_module_details
    return _get_module_details(pkg_main_name, error)
    File "C:\ProgramData\Anaconda3\lib\runpy.py", line 109, in _get_module_details
    __import__(pkg_name)
    File "C:\ProgramData\Anaconda3\lib\site-packages\spacy\__init__.py", line 5, in <module>
    from .deprecated import resolve_model_name
    File "C:\ProgramData\Anaconda3\lib\site-packages\spacy\deprecated.py", line 8, in <module>
    from .cli import download
    File "C:\ProgramData\Anaconda3\lib\site-packages\spacy\cli\__init__.py", line 5, in <module>
    from .train import train, train_config
    File "C:\ProgramData\Anaconda3\lib\site-packages\spacy\cli\train.py", line 8, in <module>
    from ..scorer import Scorer
    File "C:\ProgramData\Anaconda3\lib\site-packages\spacy\scorer.py", line 4, in <module>
    from .gold import tags_to_entities
    File "spacy/morphology.pxd", line 25, in init spacy.gold (spacy/gold.cpp:23505)
    cdef class Morphology:
    File "spacy/vocab.pxd", line 27, in init spacy.morphology (spacy/morphology.cpp:10713)
    cdef class Vocab:
    File ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd", line 155, in init spacy.vocab (spacy/vocab
    .cpp:19463)
    File "C:\ProgramData\Anaconda3\lib\site-packages\numpy\__init__.py", line 142, in <module>
    from . import add_newdocs
    File "C:\ProgramData\Anaconda3\lib\site-packages\numpy\add_newdocs.py", line 13, in <module>
    from numpy.lib import add_newdoc
    File "C:\ProgramData\Anaconda3\lib\site-packages\numpy\lib\__init__.py", line 8, in <module>
    from .type_check import *
    File "C:\ProgramData\Anaconda3\lib\site-packages\numpy\lib\type_check.py", line 11, in <module>
    import numpy.core.numeric as _nx
    File "C:\ProgramData\Anaconda3\lib\site-packages\numpy\core\__init__.py", line 26, in <module>
    raise ImportError(msg)
    ImportError:
    Importing the multiarray numpy extension module failed. Most
    likely you are trying to import a failed build of numpy.
    If you're working with a numpy git repo, try `git clean -xdf` (removes all
    files not under version control). Otherwise reinstall numpy.

    Continue reading...

Compartilhe esta Página