我在研究科拉布。
为了获得kaggle培训数据(https://www.kaggle.com/muerbingsha/pandatiledsingle/settings),我使用了kaggle。
这些步骤在前几天效果很好。但今天它让我犯了错误
mv: cannot move 'kaggle.json' to '/root/.kaggle/': Not a directory错误截图(以获得更好的解释)

这个问题真的很奇怪。如何处理,谢谢!
发布于 2020-05-29 00:21:43
问题解决了。我发现在StackOverflow上询问确实是找到解决方案的好方法!是啊,节省时间!
当我输入这个问题时,我发现由于上面写着!mv ... not a directory和!ls no such file or directory,所以可能没有.kaggle文件夹。
我尝试创建该文件夹,如果发生错误,只需按照说明操作即可。
!pip install kaggle -q # At first, I suspect the kaggle API lose effect so it doesn't have .kaggle folder. (not working)
!rm -rf /root/.kaggle. # when I created the folder, it says the file or dir already exits
!mkdir /root/.kaggle # successful
!mv kaggle.json /root/.kaggle/kaggle.json # not sure if I have to use full destination path, I previously only used /root/.kaggle and it failed. Don't have time to validate this thought.
!ls /root/.kaggle/kaggle.json
!kaggle datasets download muerbingsha/pandatiledsingle结论:
Colab环境改变了.kaggle因不明原因丢失的情况。
https://stackoverflow.com/questions/62076658
复制相似问题