explosion / spaCy

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

[E053] Could not read config.cfg #7453

Closed SapiensSuwan closed 3 years ago

SapiensSuwan commented 3 years ago

my code

!pip install https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.2.0/en_core_web_sm-2.2.0.tar.gz !pip install pyresparser data_words_nostops = remove_stopwords(abs_words) data_words_bigrams = make_bigrams(data_words_nostops) nlp = spacy.load('en_core_web_sm', disable=['parser', 'ner'])

Error I've got

OSError: [E053] Could not read config.cfg from /Users/suwanlong/opt/anaconda3/lib/python3.8/site-packages/en_core_web_sm/en_core_web_sm-2.3.1/config.cfg

Your Environment

I have tried

pip install -U pip setuptools wheel pip install -U spacy python -m spacy download en_core_web_sm

$!python -m spacy download en_core_web_sm import spacy nlp = spacy.load("en_core_web_sm")

All of them are not working for my case.

Any ideas? thanks!

svlandeg commented 3 years ago

Hi! The 2.2.0 model is incompatible with spaCy v3. You can check your models and installation with

python -m spacy validate

So I'm afraid you'll either have to downgrade spaCy to 2.2.4 to work with this particular model, or download a new model, e.g. https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.0.0/en_core_web_sm-3.0.0.tar.gz

SapiensSuwan commented 3 years ago

https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.0.0/en_core_web_sm-3.0.0.tar.gz

Amazing! It solved my issue. Thank you so much!

svlandeg commented 3 years ago

Happy to hear it!

github-actions[bot] commented 2 years 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.