'Jupyter notebook & 'git' is not recognized as an internal or external command, operable program or batch file

I am trying the following code in a jupyter notebook

if not os.path.exists(os.path.join(paths['APIMODEL_PATH'], 'research', 'object_detection')):
    !git clone https://github.com/tensorflow/models {paths['APIMODEL_PATH']}

but I get the following error

'git' is not recognized as an internal or external command, operable program or batch file.

Git seems to work fine in cmd.

I tried %%bash and %%cmd but that did not help.

Any suggestions?

many thanks!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source