-1

I want to use google's gpu for my model, I started using google colab. Because the kaggle API expects the username and api-key to be in a kaggle.json file located in a .kaggle directory, I first created the directory .kaggle and then the file kaggle.json, into which I wrote my username and api-key (The example below doesn't display my username and api-key). I then tried to configure the path to my json file for kaggle to use when calling the kaggle download command.

from google.colab import files

!pip install -q kaggle

uploaded = files.upload() 

!cp kaggle.json /root/.kaggle

!kaggle datasets download -d .....

1 Answers1

0

You need to create the directory. Also need to chmod.

!mkdir ~/.kaggle
!echo '{"username":"korakot","key":"xxxxxxxx"}' > ~/.kaggle/kaggle.json
!chmod 600 ~/.kaggle/kaggle.json
!kaggle datasets download -d zillow/zecon -f State_time_series.csv
korakot
  • 37,818
  • 16
  • 123
  • 144