9_Dave_9
9_Dave_9

Reputation: 714

'pip install kaggle' works fine - but 'kg command not found'

I installed kaggle-cli just fine.. everything went smoothly or so pip says.

But when I try to run the kg command or just kg --version, I get

kg command not found

I can see Kaggle in Python system packages and all the py and pyc files are there. But like no bin directory or anything.

I tried to find a similar issue online with no success - so I thought I would try here.

I am on an Ubuntu app for Windows 10. Everything else in terms of Python, Keras, Theano, etc. for my machine learning rig works just fine.

Upvotes: 12

Views: 15838

Answers (4)

sharmav
sharmav

Reputation: 11

Installing the API using pip install kaggle might still not resolve the issue. You would have to add kaggle to PATH. Opening ~/.bashrc and adding alias kaggle="~/.local/bin/kaggle" to the end of the file worked for me.

Upvotes: 0

Echo9k
Echo9k

Reputation: 584

I was having the same issue on the GCP. What I did was to reinstall it again as with the

pip install kaggle --user

Then added the directory (shown in the warning after the installation) to the PATH Then I just reopened the remote access window.

Upvotes: 0

gilgorio
gilgorio

Reputation: 558

The same problem for me. Kaggle is correctly installed with pip install kaggle --user, but "kaggle command was not found".

I located the Kaggle executable in ~/.local/bin/kaggle and solved it creating a symbolic link to /usr/bin:

ln -s ~/.local/bin/kaggle /usr/bin/kaggle

Upvotes: 15

Meg Risdal
Meg Risdal

Reputation: 1042

Shortly after you asked this question, Kaggle released an official API which I recommend you use in place of kaggle-cli. pip install kaggle will install the official API which supports these commands:

kaggle competitions {list, files, download, submit, submissions}

kaggle datasets {list, files, download, create, version, init}

kaggle config {view, set, unset}

Check out the documentation here. After installing, you will also need to generate an API token from your Kaggle user profile "Account" tab.

Upvotes: 32

Related Questions