Installation
pip install kaggle
# You may need to do pip install --user kaggle on Mac/Linux. This is recommended if problems come up during the installation process.
API credentials
# 下载 kaggle.json
https://www.kaggle.com ➡️ User Ranking ➡️ API ➡️ Create New API Token
# 将 kaggle.json put 在 .kaggle 目录下
cp kaggle.json /Users/haozhiqiang/.kaggle
# 将 dataset 下载到 .kaggle/competitions 目录下
kaggle competitions download -c donorschoose-application-screening
Warning: Your Kaggle API key is readable by other users on this system! To fix this, you can run 'chmod 600 /Users/haozhiqiang/.kaggle/kaggle.json'
# 指定权限
chmod 600 /Users/haozhiqiang/.kaggle/kaggle.json
操作在下载数据集界面有提示,如上
kaggle competitions download -c donorschoose-application-screening