trouble to install spaCy 3.0 on GoogleColab

Viewed 623

Background

I'm woking on the following local environment and need to use spaCy 3.0 on GoogleColab.

However, it looks accepted to install spaCy after 3.0 because of python version.

spaCy version    3.0.5                         
Python version   3.9.1  

Error

How can I use spaCy after 3.0 on GoogleColab or is it impossible now?

Requirement already satisfied: spacy in /usr/local/lib/python3.7/dist-packages (2.2.4)
ERROR: Could not find a version that satisfies the requirement 3.0.5 (from versions: none)
ERROR: No matching distribution found for 3.0.5

Environment

GoogleColab

!pip install spacy
!python -m spacy info
============================== Info about spaCy ==============================

spaCy version    2.2.4                         
Python version   3.7.11                                      
2 Answers

When you do pip install XXX, pip will not upgrade something you already have installed by default. To update it use the -U (or --update) flag.

pip install -U spacy

That should install the latest version.

You can use pip to install spaCy, and specify version 3.1.1

!pip install spacy==3.1.1

Then you can check the result.

import spacy
print(spacy.__version__)  # 3.1.1
Related