Python 3.x Spacy--ImportError:preshed.maps不导出预期的C函数映射\u clear

Python 3.x Spacy--ImportError:preshed.maps不导出预期的C函数映射\u clear,python-3.x,import,conda,spacy,Python 3.x,Import,Conda,Spacy,我试图导入spacy,但没有成功 >>> import spacy Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Users\Alienware\Anaconda3\envs\tf2\lib\site-packages\spacy\__init__.py", line 12, in <module> from .

我试图导入
spacy
,但没有成功

>>> import spacy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\Alienware\Anaconda3\envs\tf2\lib\site-packages\spacy\__init__.py", line 12, in <module>
    from . import pipeline
  File "C:\Users\Alienware\Anaconda3\envs\tf2\lib\site-packages\spacy\pipeline\__init__.py", line 4, in <module>
    from .pipes import Tagger, DependencyParser, EntityRecognizer, EntityLinker
  File "pipes.pyx", line 24, in init spacy.pipeline.pipes
  File "C:\Users\Alienware\Anaconda3\envs\tf2\lib\site-packages\spacy\pipeline\functions.py", line 5, in <module>
    from ..matcher import Matcher
  File "C:\Users\Alienware\Anaconda3\envs\tf2\lib\site-packages\spacy\matcher\__init__.py", line 5, in <module>
    from .phrasematcher import PhraseMatcher
  File "phrasematcher.pyx", line 1, in init spacy.matcher.phrasematcher
ImportError: preshed.maps does not export expected C function map_clear
导入空间 回溯(最近一次呼叫最后一次): 文件“”,第1行,在 文件“C:\Users\Alienware\Anaconda3\envs\tf2\lib\site packages\spacy\\uuuuu init\uuuu.py”,第12行,在 从…起进口管道 文件“C:\Users\Alienware\Anaconda3\envs\tf2\lib\site packages\spacy\pipeline\ \uuuuu init\uuuuu.py”,第4行,在 从.pipes导入标记器、DependencyParser、EntityRecognizer、EntityLinker 文件“pipes.pyx”,第24行,在init spacy.pipeline.pipes中 文件“C:\Users\Alienware\Anaconda3\envs\tf2\lib\site packages\spacy\pipeline\functions.py”,位于 从..匹配器导入匹配器 文件“C:\Users\Alienware\Anaconda3\envs\tf2\lib\site packages\spacy\matcher\\uuuuu init\uuuuu.py”,第5行,在 from.phrasematcher导入phrasematcher 文件“phrasematcher.pyx”,第1行,在init spacy.matcher.phrasematcher中 ImportError:preshed.maps不导出预期的C函数映射。\u清除 我更新了
conda
,然后运行
updateconda all
。我删除了python的早期版本,并安装了最新版本(3.8)。我卸载了spacy并重新安装了它。什么都没用

我上一次与spacy一起工作是在3周前,我没有遇到任何问题。突然间,这一例外不知从何而来


你对情况的理解是什么?有没有关于如何调试问题或修复故障的想法?

我也有同样的问题,我通过重新安装带有
--upgrade
标志的preshed来修复它。

这与非常类似,最好删除其中一个。