Search code examples
versiongoogle-colaboratory

How do I check which versions of packages I'm using in GoogleColab?


Some are preinstalled in Colab and some installed with !pip install module_name in Colab cell.


Solution

  • First you have to import the module, then run this command:

    name_of_module.__version__
    

    For example:

    import nltk
    import tensorflow as tf
    nltk.__version__
    # '3.2.5'
    tf.__version__
    # '2.6.0'