In Python, I was using Spacy library there was trying below commands:-
import spacy
Getting Below Error
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'spacy'
Then tried to install spacy using below command:-
pip install spacy
Message:
It gives Requirement already satisfied.
Commands Used :-
import spacy
pip install spacy
CodePudding user response:
Try pip install -U spacy
and python -m spacy download en_core_web_sm
CodePudding user response:
Try running !pip install spacy
in a cell in your notebook.
If that doesn't work, it might be possible that your terminal is in different environment and code is running in different environment. Activate same environment in both cases.
CodePudding user response:
- Spacy module is a bit more finicky than others
- https://spacy.io/usage <-- use this guide to generate the terminal code to install the correct version.
- This is just an example from the above code generator link.
- You need to generate the installation code that satisfies your own needs.
pip install -U pip setuptools wheel
pip install -U spacy
python -m spacy download en_core_web_sm
In your case becsue you have already installed some version of it I would recommend:
A.) uninstalling the whole module
pip uninstall spacy
- OR
- Don't know how to uninstall unwanted Spacy installation, model
B.) Creating a new fresh environemnt
There are some other libraries that ahev to be adjusted as well.
- So it is important to search more complex frameworks how to install before installing them in a "generalist way".
- Further examples.: