I have installed spaCy with python for my NLP project.
I have installed that using pip. How can I verify installed spaCy version?
using
pip install -U spacy
What is command to verify installed spaCy version?
I have installed spaCy with python for my NLP project.
I have installed that using pip. How can I verify installed spaCy version?
using
pip install -U spacy
What is command to verify installed spaCy version?
You can also do python -m spacy info. If you're updating an existing installation, you might want to run python -m spacy validate, to check that the models you already have are compatible with the version you just installed.
Use command - python -m spacy info to check spacy version
If you ask yourself: How to find any Python pkg version? This one should be used/ as well, not only for Spacy ofc:
The easiest (if you installed it using pip):
pip show spacy #pip3 if you installed it using pip3
Or:
python -m spacy --version
Or... just run python (with the version that you installed Spacy on) and use the version method
If you want to know the version of any Python pkg (package) you are working with this would work for you every time!
run:
python
>> import spacy
>> print(spacy.__version__)
Or, Either:
python -m spacy --version
or
python3 -m spacy --version #depends where it is install (python or python3)
If you installed with pip you can try to find it with pip list and get version info with pip show <name>
If you are using python3, you can use your package manager (pip) pip3 list and find spacy's version.
For Python 2.7+ pip list does the job
Another way to get versions of Spacy and the dependencies is to use: pip freeze requirements.txt. See this link for the official documentation for both Mac and Windows OSs.
The main benefit I find with this approach is that you get a list of all dependencies plus the versions. Libraries are often times very picky about the versions. Using this method you can just share the requirements.txt with your collaborators and then they are good to go too :)
Edit: Thanks to hc_dev for the valuable comment.
Simply use !python -m spacy info to get details on Jupyter notebook, remove ! for normal python command check.
Check the above screenshot to see the result details.
Thanks