As the error message mentions, it cannot create /root/.kaggle
because it already exists.
You would want to make the directory only when it does not already exists. Hence you can use the -p
flag along with mkdir
, like this:
!mkdir -p ~/.kaggle
You can also reference to How to mkdir only if a directory does not already exist?.