# pip install kaggle --upgrade
# kaggle competitions download -c titanic
raceback (most recent call last):
File "/opt/conda/bin/kaggle", line 5, in <module>
from kaggle.cli import main
File "/opt/conda/lib/python3.7/site-packages/kaggle/__init__.py", line 23, in <module>
api.authenticate()
File "/opt/conda/lib/python3.7/site-packages/kaggle/api/kaggle_api_extended.py", line 166, in authenticate
self.config_file, self.config_dir))
OSError: Could not find kaggle.json. Make sure it's located in /aiffel/.kaggle. Or use the environment method.
https://www.kaggle.com/ 에서 가입
Home > account > [API] - Create New API Token 클릭
저장된 파일을 ~/.kaggle 폴더로 복사
# cp kaggle.json ~/.kaggle/
# chmod 600 ~/.kaggle/kaggle.json
# cat ~/.kaggle/kaggle.json
{"username":"sjpotato","key":"xxxx"}
* 확인해보니 kaggle 사이트의 계정과 token 키정보가 있음
# kaggle competitions download -c titanic
Downloading titanic.zip to /aiffel
0%| | 0.00/34.1k [00:00<?, ?B/s]
100%|███████████████████████████████████████████████████████████████████████████████| 34.1k/34.1k [00:00<00:00, 7.11MB/s]