'How to use different version of library in google colab?

I am working on a project, and the project requires two different versions of the library(let's say "spacy" 2.2.4 and 3.0.0). I couldn't able to use two different versions of the library in the same notebook.

PS - I know how to work with the virtual environment in the local system, but would like to know how we can deal with that in google colab.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source