0

I'd like to use wandb on Colab, and I've installed it through pip on the command line. However, the import isn't recognized on Colab, so I have to run !pip install wandb each time.

How can I install wandb locally so that I don't have to install it on the Colab notebook each time?

mpnm
  • 481
  • 1
  • 7
  • 13
  • Even if you restart your notebook, you'll still be using the same VM. This means that you only need to install it if it's not already installed. Try removing the cell and restarting the notebook, it should work fine – aaossa Feb 20 '22 at 03:40
  • Possible duplicate: [Do I have to install packages needed each time when I start Google Colab?](https://stackoverflow.com/questions/52399380/do-i-have-to-install-packages-needed-each-time-when-i-start-google-colab) – aaossa Feb 20 '22 at 03:41
  • 1
    @aossa You're correct. I'm not sure why I didn't think it worked before, but I may have misremembered. There's no problem when I restart the runtime or refresh, even if I don't use the pip install command. – mpnm Feb 20 '22 at 03:53
  • To do that you will have to switch to local runtime on Colab so that you can use libraries installed on your system and not reinstall them every time. Doing so will use your system environment possibly even hardware resources (CPU + GPU ) so it's not a preferred way. – Ashwin Raikar Feb 20 '22 at 04:26

0 Answers0