![71e0b2bf55379e692b792a873d9452a1.png](https://img-blog.csdnimg.cn/img_convert/71e0b2bf55379e692b792a873d9452a1.png)
SCDN博客:https://blog.csdn.net/weixin_41923658
微信公众号:「汤姆鱼」
==================手动分割线=======================
一、安装 kaggle 库
pip install kaggle
![d34264528cd78cced8f3f962e7e8eb18.png](https://img-blog.csdnimg.cn/img_convert/d34264528cd78cced8f3f962e7e8eb18.png)
ps:安装 kaggle 库需要用到「歪王」,否则可能会下载出错;
外皮恩梯子:https://blog.csdn.net/weixin_41923658/article/details/88817136
- 注意:有可能安装库后,却没有生成 .kaggle 文件夹,如果没有,在 Anaconda Prompt 终端里面输入 kaggle competitions list) ,再刷新整个文件夹就可以。
没有生成 .kaggle 文件夹
![2870343d7a94ec1bf19df09c0f118ff2.png](https://img-blog.csdnimg.cn/img_convert/2870343d7a94ec1bf19df09c0f118ff2.png)
刷新一下,生成了 .kaggle 文件夹
![fbe7b855fde640ea745faf4fa51b13fc.png](https://img-blog.csdnimg.cn/img_convert/fbe7b855fde640ea745faf4fa51b13fc.png)
二、登录/注册 Kaggle 账号;
我这里直接是用 Google账号登录的,另外这个地方也需要「歪王」;
![44b5675f6bfdaf93a8225f1471c6eb40.png](https://img-blog.csdnimg.cn/img_convert/44b5675f6bfdaf93a8225f1471c6eb40.png)
三、找到需要下载的数据集
这里我以下载竞赛 bluebook for bulldozers数据集为例,来进行演示:
- 向点击 Rules --> I Understand and Accept;
![1cd41f1e6451d259c0cc568b18ad0236.png](https://img-blog.csdnimg.cn/img_convert/1cd41f1e6451d259c0cc568b18ad0236.png)
- 验证信息;
![e8e81338ef7a5fb46d1208a20786f09f.png](https://img-blog.csdnimg.cn/img_convert/e8e81338ef7a5fb46d1208a20786f09f.png)
ps: 这里也需要「歪王」,才能验证相关信息
四、下载数据集
- 点击 个人账户图标,选择「My Account」;
![be9c5ffcfc11bc6333784cda54b8f7d8.png](https://img-blog.csdnimg.cn/img_convert/be9c5ffcfc11bc6333784cda54b8f7d8.png)
- 点击「Create New API」;
![b8123a5122b1661b631aba0ca2fe5aaa.png](https://img-blog.csdnimg.cn/img_convert/b8123a5122b1661b631aba0ca2fe5aaa.png)
ps:
1、 这里会在下载 json 文件,请将它保存到 .kaggle 文件里;
![a39088aa892658019bcd3eb3b406687a.png](https://img-blog.csdnimg.cn/img_convert/a39088aa892658019bcd3eb3b406687a.png)
- 返回到数据集界面,点击「Data」,复制下载命令;
![27ef4fdc091d7a6085bc14c6dc9a6b96.png](https://img-blog.csdnimg.cn/img_convert/27ef4fdc091d7a6085bc14c6dc9a6b96.png)
- 将复制的下载命令,粘贴到 cmd 终端中,运行下载。
![1914ce8b12cc2a396446db4ba5c7da87.png](https://img-blog.csdnimg.cn/img_convert/1914ce8b12cc2a396446db4ba5c7da87.png)
![e9af48eb4a1e8d5aba1a06754a4b056b.png](https://img-blog.csdnimg.cn/img_convert/e9af48eb4a1e8d5aba1a06754a4b056b.png)
- 最后下载的文件在 C 盘的用户系统文件夹中;
![bb5960c2f9246cfec0c0895d3456854e.png](https://img-blog.csdnimg.cn/img_convert/bb5960c2f9246cfec0c0895d3456854e.png)
---------ok!!完毕