When executing the following lines,
!pip install kaggle
!kaggle competitions download -c dogs-vs-cats -p /content/
I got the following erro
Initially had trouble copying the .json file into the colab VM. Eventually for me the following worked: working through google colaboratory, first you need to install the kaggle API with:
!pip install kaggle
Further information and instructions here https://github.com/Kaggle/kaggle-api. Next, the link instructs you to activate the API with a file you can download with your kaggle user on kaggle.com -> My account -> create new API token. this file is kaggle.json.
Next, in order to upload this kaggle.json file to the colab VM for activation, you can upload it first to your google drive (simply drag it to your drive). Next enter the following command in colab to import your drive:
from google.colab import drive
drive.mount('/content/gdrive')
after authorization is completed, you can copy the file from the drive to colab with:
!cp /content/gdrive/My\ Drive/kaggle.json ~/.kaggle/kaggle.json
And Finally, hopefully you will be able to run the command:
!kaggle competitions download -c <competition-name>
I hope this helps!