【发布时间】:2020-09-22 23:50:56
【问题描述】:
我正在尝试使用 Kaggle API 从 kaggle 网站提取数据。我正在使用 Ubuntu 18.04。当我输入以下命令时:
kaggle competitions download -c home-credit-default-risk
我收到以下错误:
Traceback (most recent call last):
File "/home/hduser/anaconda3/bin/kaggle", line 5, in <module>
from kaggle.cli import main
File "/home/hduser/anaconda3/lib/python3.7/site-packages/kaggle/__init__.py", line 23, in <module>
api.authenticate()
File "/home/hduser/anaconda3/lib/python3.7/site-packages/kaggle/api/kaggle_api_extended.py", line 149, in authenticate
self.config_file, self.config_dir))
OSError: Could not find kaggle.json. Make sure it's located in /home/hduser/.kaggle/kaggle.json. Or use the environment method.
这很奇怪,因为我将 kaggle.json 文件保存在正确的目录中,并且我拥有所有权限。
ls ~/.kaggle
返回:
kaggle.json
我错过了什么吗?
【问题讨论】:
-
嗨,Yohan,你解决了吗?
-
是的,答案在下面