Google Colab + Kaggle Authentication Setup SIMPLE solution

Scroll down and read the solution by nanokaggle

https://www.kaggle.com/general/51898

Easy Steps to persist Kaggle profile

  1. Download kaggle.json from Kaggle – MyAccount – Create New API Token - auto downloads as "kaggle.json
  2. Import json into notebook - run in a cell
    from google.colab import files
    files.upload()
  • Browse to downloaded kaggle.json and upload
  1. Setup Kaggle DIR; copy json file ; chmod

!mkdir -p ~/.kaggle
!cp kaggle.json ~/.kaggle/
!chmod 600 ~/.kaggle/kaggle.json
!ls ~/.kaggle

  1. Verify json content

!ls -l ~/.kaggle
!cat ~/.kaggle/kaggle.json

  1. Install kaggle packages
    !pip install -q kaggle
    !pip install -q kaggle-cli
  2. List Kaggle DataSets
    !kaggle datasets list
  3. List Kaggle Competitions

!kaggle competitions list

  1. list files in a dataset /competition using string pattern

!kaggle competitions list -s diabetic

After following the steps I ended up with an error

can some one please help me on fixing the issue?

How to use Kaggle datasets in Google Colab?

A quick guide to use Kaggle datasets inside Google Colab

https://medium.com/unpackai/how-to-use-kaggle-datasets-in-google-colab-f9b2e4b5767c