過程中遇到的問題
- pip install kaggle后找不到.kaggle文件夾
- kaggle命令安裝顯示
kaggle: command not found error
第一步:點(diǎn)擊Kaggle比賽頁面鏈接
https://www.kaggle.com/c/bosch-production-line-performance/data
第二步:在Rules那里 accept rules郭膛,不然后續(xù)會(huì)有報(bào)錯(cuò)
第三步: kaggle主頁找到My-account谭期,Create New API token 自動(dòng)下載的 kaggle.json
第四步: 打開cmd命令行 輸入
pip install kaggle
問題1就出現(xiàn)了, 理應(yīng)是會(huì)出現(xiàn).kaggle的文件夾,可是我的路徑下并沒有葬项, 我懷疑就是電腦里配置的python下的庫文件夾里鸟召,如圖
1.jpg
問題1的解決方案毙芜, 雙擊kaggle.exe 文件夾就會(huì)自動(dòng)出現(xiàn)在文件夾了撤逢,如下
2.jpg
把下載好的 kaggle.json
放進(jìn)這個(gè) .kaggle
文件夾里就完成了一大半了娄柳。
第五步:開始使用kaggle命令
#回到kaggle比賽頁面寓辱,找到下載的API
kaggle competitions download -c bosch-production-line-performance
問題2出現(xiàn),kaggle: command not found error
赤拒,這是kaggle命令 要回到對應(yīng)的路徑秫筏, git官網(wǎng)有教怎么找
If you run into a kaggle: command not found error,
ensure that your python binaries are on your path.
You can see where kaggle is installed by doing pip uninstall kaggle and seeing where the binary is.
For a local user install on Linux, the default location is
~/.local/bin. On Windows, the default location is $PYTHON_HOME/Scripts.
好的 開干,打開
屏幕截圖 2021-06-19 142811.jpg
找到C:\Users\dengj\AppData\Roaming\Python\Python38\Scripts
文件夾
在文件夾的窗口直接輸入CMD挎挖,彈出就是對應(yīng)路徑的命令窗口
重新輸入这敬,API的代碼
kaggle competitions download -c bosch-production-line-performance
成功!