boncey / Flickr4Java

Java API For Flickr. Fork of FlickrJ
BSD 2-Clause "Simplified" License
176 stars 155 forks source link

spaCy installing problem on macos #650

Closed zufilcarter closed 2 years ago

zufilcarter commented 2 years ago

Hello,

This is my first attempt to solve the issue related to spacy installing, so I hope everyone will understand what is the problem:)

Firstly, I made it all by instructions presented on this link (https://spacy.io/usage). The settings that I used for installing are next: Operating system - macOS / OSX Platform - ARM / M1 Package manager - pip Hardware - CPU Configuration - virtual env and train models Trained pipelines - English Select pipeline for - efficiency

After setting all these setting presented above, I open terminal and enter next text: python -m venv .env source .env/bin/activate pip install -U pip setuptools wheel pip install -U 'spacy[transformers,lookups,apple]' python -m spacy download en_core_web_sm

I get such message: ✔ Download and installation successful You can now load the package via spacy.load('en_core_web_sm')

Then I open pycharm, try to Run selected python file and get such error: Traceback (most recent call last): File "/Users/zulf/PycharmProjects/pythonProject/CodeAcademy/Build-Chatbots-with-Python-Skill-Path/3-Rule-Based-Chatbots/1-Introduction-to-Natural-Language-Processing-and-Chatbot-Models/1-getting-started-with-natural-language-processing/3-Parsing-Text.py", line 5, in dependency_parser = spacy.load('en') File "/Users/zulf/PycharmProjects/pythonProject/venv/lib/python3.9/site-packages/spacy/init.py", line 51, in load return util.load_model( File "/Users/zulf/PycharmProjects/pythonProject/venv/lib/python3.9/site-packages/spacy/util.py", line 426, in load_model raise IOError(Errors.E941.format(name=name, full=OLD_MODEL_SHORTCUTS[name])) # type: ignore[index] OSError: [E941] Can't find model 'en'. It looks like you're trying to load a model from a shortcut, which is obsolete as of spaCy v3.0. To load the model, use its full name instead:

nlp = spacy.load("en_core_web_sm")

For more details on the available models, see the models directory: https://spacy.io/models. If you want to create a blank model, use spacy.blank: nlp = spacy.blank("en")

Before writing this usse on github I tried different ways of solving this problem, but any one of them couldn't help me.

Please help me :)