如何在 Google Colaboratory 的 VM 中安装额外的包?

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

我正在玩 Google Colaboratory,并立即注意到 tqdm 没有预装。有没有办法安装额外的包?

是的。您可以根据需要使用 pipapt 安装软件包。

pip 的一个例子在 welcome notebook:

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

apt 的示例在 snippets:

!apt update && apt install -y libfluidsynth1

对于 tdqm,!pip install tqdm 对我有用。

是的,要安装 tqdm,您可以使用

!pip install tqdm

希望对您有所帮助。