How do I install a library permanently in Colab?
问题 In Google Colaboratory, I can install a new library using !pip install package-name . But when I open the notebook again tomorrow, I need to re-install it every time. Is there a way to install a library permanently? No need to spend time installing every time to use? 回答1: Yes. You can install the library in Google Drive. Then add the path to sys.path . import os, sys from google.colab import drive drive.mount('/content/mnt') nb_path = '/content/notebooks' os.symlink('/content/mnt/My Drive