0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

JupyterでNameError: name 'kaggle' is not definedになった件について

Posted at

KaggleのデータをダウンロードできるKaggle APIを利用しようとしたらkaggleはないよと言われたので対処しました

問題

Jupyter上で

!pip install kaggle

でエラーはなくインストールが成功した状態で

kaggle competitions files -c titanic

をするとname 'kaggle' is not definedと怒られてしまう

解決策

トークンを取得する必要があった
https://www.currypurin.com/entry/2018/kaggle-api

AccountからTokenを発行して、kaggle.jsonを、~/.kaggle/kaggle.jsonに移動させる

そのあと、Jupyter上ではなく、Anaconda Prompt上で上記のコマンドを打ったら成功した

最後に

Kaggleを始めたが、環境的なところでたくさんつまずきます

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?