explosion / spaCy

💫 Industrial-strength Natural Language Processing (NLP) in Python
https://spacy.io
MIT License
30.15k stars 4.4k forks source link

Failed to import spacy in jupyter notebook #12139

Closed dansvotrecoeur closed 1 year ago

dansvotrecoeur commented 1 year ago

Discussed in https://github.com/explosion/spaCy/discussions/12138

Originally posted by **dansvotrecoeur** January 20, 2023 I got error 'ImportError: blis.cy does not export expected C function sgemm' when I tried to run import spacy in Jupyter Notebook. May anyone can help to resolve this problem? Thank you. Here is the error code: --------------------------------------------------------------------------- ImportError Traceback (most recent call last) Input In [5], in () ----> 1 import spacy File ~\anaconda3\lib\site-packages\spacy\__init__.py:11, in 8 setup_default_warnings() # noqa: E402 10 # These are imported as part of the API ---> 11 from thinc.api import prefer_gpu, require_gpu, require_cpu # noqa: F401 12 from thinc.api import Config 14 from . import pipeline # noqa: F401 File ~\anaconda3\lib\site-packages\thinc\api.py:2, in 1 from .config import Config, registry, ConfigValidationError ----> 2 from .initializers import normal_init, uniform_init, glorot_uniform_init, zero_init 3 from .initializers import configure_normal_init 4 from .loss import CategoricalCrossentropy, L2Distance, CosineDistance File ~\anaconda3\lib\site-packages\thinc\initializers.py:4, in 1 from typing import Callable, cast 2 import numpy ----> 4 from .backends import Ops 5 from .config import registry 6 from .types import FloatsXd, Shape File ~\anaconda3\lib\site-packages\thinc\backends\__init__.py:7, in 4 from contextvars import ContextVar 5 import threading ----> 7 from .ops import Ops 8 from .cupy_ops import CupyOps 9 from .numpy_ops import NumpyOps File ~\anaconda3\lib\site-packages\thinc\backends\ops.py:16, in 13 from ..types import DeviceTypes, Generator, Padded, Batchable, SizedGenerator 14 from ..util import get_array_module, is_xp_array, to_numpy ---> 16 from .cblas import CBlas 18 ArrayT = TypeVar("ArrayT", bound=ArrayXd) 19 FloatsT = TypeVar("FloatsT", bound=_Floats) File ~\anaconda3\lib\site-packages\thinc\backends\cblas.pyx:1, in init thinc.backends.cblas() ImportError: blis.cy does not export expected C function sgemm
danieldk commented 1 year ago

Could you please not open duplicate issues/threads? Let's continue the discussion in the thread.

dansvotrecoeur commented 1 year ago

Oke, thank you I will discuss the issues on the thread.

github-actions[bot] commented 1 year ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.