Skip to content

Instantly share code, notes, and snippets.

@tommypratama
Last active May 7, 2019 22:49
Show Gist options
  • Save tommypratama/5ecd01ced98b9e8746ce3d4c460c1097 to your computer and use it in GitHub Desktop.
Save tommypratama/5ecd01ced98b9e8746ce3d4c460c1097 to your computer and use it in GitHub Desktop.

Install Kaggle API

Error

jovyan@3825ba6d1a66:~$ kaggle
Traceback (most recent call last):
  File "/opt/conda/bin/kaggle", line 6, in <module>
    from kaggle.cli import main
  File "/opt/conda/lib/python3.6/site-packages/kaggle/__init__.py", line 23, in <module>
    api.authenticate()
  File "/opt/conda/lib/python3.6/site-packages/kaggle/api/kaggle_api_extended.py", line 116, in authenticate
    self.config_file, self.config_dir))
OSError: Could not find kaggle.json. Make sure it's located in /home/jovyan/.kaggle. Or use the environment method.

Solution

$ kaggle
"kaggle": command not found
$ python3 -m pip uninstall kaggle

then

$ python3 -m pip install kaggle
$ kaggle
usage: kaggle [-h] [-v] {competitions,c,datasets,d,kernels,k,config} ...

if warning message:

Warning: Your Kaggle API key is readable by other users on this system! To fix this, you can run 'chmod 600 /home/jovyan/.kaggle/kaggle.json'
chmod 600 /home/jovyan/.kaggle/kaggle.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment