Can‘t find kaggle.json file in google colab

这里写自定义目录标题

!mkdir ~/.kaggle
!touch ~/.kaggle/kaggle.json

api_token = {"username":"balibala","key":"balabala"}

import json

with open('/root/.kaggle/kaggle.json', 'w') as file:
    json.dump(api_token, file)

!chmod 600 ~/.kaggle/kaggle.json

你可能感兴趣的:(python,人工智能,开发语言)