2

I am trying to install the following git repo. But it says cannot find command 'git' though I have git software installed in my computer.

pip install git+https://github.com/NREL/ditto.git@master

Mahi Rahman
  • 33
  • 1
  • 5
  • Possible duplicate of [Cannot find command 'git' - windows](https://stackoverflow.com/questions/29565779/cannot-find-command-git-windows) – phd Jun 20 '18 at 19:36

2 Answers2

2

Did you put the path?

If you have GitHub for Windows (before version 1.1), your path should be:

C:\Users\\AppData\Local\GitHub\PortableGit_\cmd

After confirming and copying your path, do the following:

  • -Right click on My Computer or This PC

  • -Click on Properties

  • -Click on Advanced system settings

  • -Click on Environment Variables under the Advanced tab

  • -Add your path with ; before it in the variable Path

  • -Press Ok

  • -Use a new terminal

Panos Kalatzantonakis
  • 12,525
  • 8
  • 64
  • 85
bembas
  • 762
  • 8
  • 20
  • My one is the latest verison of github. I just downloaded and installed it, 2.17 I guess. Should the path still be the same? And where should I add this path? File >> Local repository? Or File >> New repository? – Mahi Rahman Jun 20 '18 at 19:00
  • 1
    your path should be something like this C:\Program Files\Git\usr\bin\ – bembas Jun 20 '18 at 19:11
  • I have been able to add the path to the path variables, and checked it with `git --version`. But while pip installing the code from the original post, it is showing the following error `Command python setup.py egg_info failed with error code 1 in C:\Users\mrahman\AppData\Local\Temp\pip-j_5r5727-build Storing debug log for failure in C:\Users\mrahman\pip\pip.log` – Mahi Rahman Jun 20 '18 at 20:07
  • maybe your pip command isnt upgrade try --> python -m pip install --upgrade pip --> pip install "package-name" if you are up to date and you still have problem try sudo ---> pip3 install git+https://github.com/donnemartin/gitsome.git Solve my issue (I have both python versions installed). – bembas Jun 20 '18 at 21:10
0

Please add [Git Installed Directory]/usr/bin and [Git Installed Directory]/bin

to your PATH environment variable in Windows 10.

yeachan park
  • 154
  • 2
  • 4