使用“import spacy”导入 spacy 时,出现此错误。
ImportError Traceback (most recent call last)
<ipython-input-1-76a01d9c502b> in <module>
----> 1 import spacy
~/.local/lib/python3.6/site-packages/spacy/__init__.py in <module>
8
9 # These are imported as part of the API
---> 10 from thinc.api import prefer_gpu, require_gpu, require_cpu # noqa: F401
11 from thinc.api import Config
12
~/.local/lib/python3.6/site-packages/thinc/api.py in <module>
20 from .backends import use_pytorch_for_gpu_memory, use_tensorflow_for_gpu_memory
21
---> 22 from .layers import Dropout, Embed, expand_window, HashEmbed, LayerNorm, Linear
23 from .layers import Maxout, Mish, MultiSoftmax, Relu, softmax_activation, Softmax, LSTM
24 from .layers import CauchySimilarity, ParametricAttention, Logistic
~/.local/lib/python3.6/site-packages/thinc/layers/__init__.py in <module>
52 from .padded2list import padded2list
53 from .remap_ids import remap_ids
---> 54 from .strings2arrays import strings2arrays
55 from .with_array import with_array
56 from .with_array2d import with_array2d
~/.local/lib/python3.6/site-packages/thinc/layers/strings2arrays.py in <module>
1 from typing import Tuple, List, Callable, Sequence
----> 2 from murmurhash import hash_unicode
3
4 from ..model import Model
5 from ..config import registry
ImportError: cannot import name 'hash_unicode'
系统是 ubuntu,GPU 不可用。如何解决这个问题。
另外,有没有办法通过删除所有 spacy 包来完全重新安装 spacy,因为我认为这可能会解决问题。