Join the Kedro community

Updated yesterday

Kedro Not Recognized as a CLI in Anaconda Prompt

Hello,
I hope that this finds you well.

one of my mate (using windows) has an issue with kedro not being recognized as a cli.
She is using anaconda prompt, created a virtual environment, installed kedro (and other deps), but when running kedro run (from the activated conda env) she gets

'kedro' is not recognized as an internal or external command, operable program or batch file.
Nb: if we try to `import kedro` using that same conda env, that works properly.

Any ideas?

J
C
N
11 comments

Hi Cyril,

You can try following options:
1. Ensure the Conda Environment is Activated before running any Kedro commands
2. Try to reinstall Kedro using pip

thanks.
1. is checked
and 2. well, it was installed with pip

Also try this

Check if Kedro's CLI is in the Scripts Directory, Navigate to your environment's Scripts directory and verify that kedro.exe exists.

ok, and what if it's not there?

Kedro is not installed in that conda env

ok, but actually, import kedro works in the env. So, installation seems ok, except for the cli part which is not recognized

Sometimes, activating a Conda environment does not correctly add the Scripts directory to the PATH.

Check the Scripts directory and if its not there try uninstalling Kedro from your conda env and reinstall again with pip.

If you do this in Windows, you should find similar pattern.

Attachment
image.png

here I have the conda env name kedro, so if kedro is not found as a command, check if the bin or Script has a kedro.exe .

Also maybe try different the normal cmd terminal (and close the terminal and re-open, sometime maybe it fails to add things to PATH), I never use the Anaconda prompt so I don't know what does it actually do.

Add a reply
Sign up and join the conversation on Slack