How to install extra packages in Google Colaboratory's VM?

Viewed 16814

I'm playing with Google Colaboratory, and noticed right off the bat that tqdm is not pre-installed. Is there any way to install additional packages?

2 Answers

Yup. You can use pip or apt to install packages as needed.

One example for pip is in the welcome notebook:

!pip install -q matplotlib-venn
from matplotlib_venn import venn2
venn2(subsets = (3, 2, 1))

An example for apt is in the snippets:

!apt update && apt install -y libfluidsynth1

In the case of tdqm, !pip install tqdm worked for me.

Yes, to install tqdm you can use

!pip install tqdm

Hope this helps.

Related