【发布时间】:2020-04-28 11:40:29
【问题描述】:
我正在尝试从这个 Kaggle 比赛中下载数据集:
https://www.kaggle.com/c/pku-autonomous-driving/overview
进入 Google Colab。
我从 Kaggle 下载了我的 .json 文件并使用了以下命令:
# Upload data to Google Colab
import os
os.environ['KAGGLE_USERNAME'] = "xxxxxx" # username from the json file
os.environ['KAGGLE_KEY'] = "xxxxxxxxxxxxxxxxxxxxxxxxxxxx" # key from the json file
!kaggle competitions download -c pku-autonomous-driving # api copied from kaggle
但这会将所有文件下载到 Google Collab 中,而不会在此过程中创建任何文件夹并将所有内容保存在一起,最终在几分钟后它会失败,因为要下载的请求太多。
我的问题是:如何将其下载为.zip 文件,或以任何其他方式将其下载到 Google Collab 中? (在这里问之前我确实搜索过,但没有找到很好的解决方案)?
我也尝试点击竞赛 API 附近的下载按钮,并复制链接,并尝试使用!wget ("link address"),但这也失败了并且没有开始下载文件。
我还有其他选择可以尝试,例如将其上传到我的 Google 云端硬盘然后安装它,但我确实想知道是否有解决方法。
【问题讨论】:
-
这能回答你的问题吗? Download file from Kaggle to Google Colab
标签: google-colaboratory kaggle