Unable to import git module in python #1841
-
Today while working on a project on Python I needed to import git module so in I opened CMD and entered the following command
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
GitPython provides a For the GitPython Is Git installed? If it is installed and usable, then running If you are able to successfully run |
Beta Was this translation helpful? Give feedback.
GitPython provides a
git
module for Python code, but it does not provide Git itself. GitPython does most of its work by using the externalgit
command that Git provides. So GitPython needs Git to be present.For the GitPython
git
module to make use of this externalgit
command, the external command must either be runnable asgit
from the environment in which you run the Python process that uses GitPython, or specially configured as described in the message you saw. In most cases, it either is present asgit
or is intended to be present asgit
.Is Git installed? If it is installed and usable, then running
g…