I successfully installed Spacy using pip install spacy and alternatively through Pycharms virtual env, but when I import spacy in my program it's giving me the following error;

    home/pi/.virtualenvs/cv/bin/python /home/pi/PycharmProjects/testSpeech/main.py
Traceback (most recent call last):
  File "/home/pi/PycharmProjects/testSpeech/main.py", line 2, in <module>
    import spacy
  File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/spacy/__init__.py", line 10, in <module>
    from thinc.neural.util import prefer_gpu, require_gpu
  File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/thinc/neural/__init__.py", line 4, in <module>
    from ._classes.model import Model  # noqa: F401
  File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/thinc/neural/_classes/model.py", line 11, in <module>
    from ..train import Trainer
  File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/thinc/neural/train.py", line 7, in <module>
    from .optimizers import Adam, linear_decay
  File "thinc/neural/optimizers.pyx", line 14, in init thinc.neural.optimizers
  File "thinc/neural/ops.pyx", line 36, in init thinc.neural.ops
  File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/blis/__init__.py", line 3, in <module>
    from .cy import init
ImportError: /home/pi/.virtualenvs/cv/lib/python3.7/site-packages/blis/cy.cpython-37m-arm-linux-gnueabihf.so: undefined symbol: __atomic_load_8

Process finished with exit code 1

Any idea what's happening?

  • Use 'pip3 install spacy' for Python3 – CoderMike Jan 14 at 15:12

With pip and python you have installed the Python version 2 of spacy. This isn't supported any longer, and it's not surprising that you have problems. Use Python version 3:

pip3 install spacy

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.