I've tried virtualenv and conda, it was successfully installed but I cannot active the virtual environment. Then I think about saving Colab environment (I mean installed libraries) to somewhere, maybe Google Drive then I can reuse it.
Is it possible?
You can add a directory in GDrive to PYTHONPATH, e.g. /content/drive/My Drive/Colab Notebooks/
Then Python will search for an installed library there. You still need to mount to GDrive every time, though.
For the questioner and for whom reached here because of the same issue,
A good answer was posted after this question : How do I install a library permanently in Colab?
It uses the way you install libraries into your Google Drive.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With