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

1

2 Answers 2

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

4
  • 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? Commented Jun 20, 2018 at 19:00
  • 1
    your path should be something like this C:\Program Files\Git\usr\bin\
    – bembas
    Commented Jun 20, 2018 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 Commented Jun 20, 2018 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+github.com/donnemartin/gitsome.git Solve my issue (I have both python versions installed).
    – bembas
    Commented Jun 20, 2018 at 21:10
-1

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

to your PATH environment variable in Windows 10.

1
  • This simply repeats the accepted answer.
    – tripleee
    Commented Nov 1, 2023 at 7:30

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.