When executing the following lines,
!pip install kaggle
!kaggle competitions download -c dogs-vs-cats -p /content/
I got the following error messages,
Traceback (most recent call last):
File "/usr/local/bin/kaggle", line 7, in <module>
from kaggle.cli import main
File "/usr/local/lib/python3.6/dist-packages/kaggle/__init__.py", line 23, in <module>
api.authenticate()
File "/usr/local/lib/python3.6/dist-packages/kaggle/api/kaggle_api_extended.py", line 109, in authenticate
self._load_config(config_data)
File "/usr/local/lib/python3.6/dist-packages/kaggle/api/kaggle_api_extended.py", line 151, in _load_config
raise ValueError('Error: Missing %s in configuration.' % item)
ValueError: Error: Missing username in configuration.
I don't know what just happened...same lines just worked fine before. It's the first time I found this problem.
$HOME=/content
for historical reasons, but recently undid that. If you just usefilename = os.path.expanduser("~/.kaggle/kaggle.json")
in the snippet above, you shouldn't need to do the extra copy (since I'm guessing you only need the file in one place). – Dirt