Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I am trying to commit my code from a Windows system into a git repository. But whenever I execute "git commit" command, I get the below error:

.git/hooks/pre-commit: line 11: py: command not found

Also tried adding the python path to the "Path" system vriables. But no resolution.

Py is the Windows Python launcher. It helps locating the correct Python version, in the case the system has installed multiple versions. You can find more information here.

Assure that you have checked the "Install py" option when installing python on your system.

Thanks a lot.. This really helped. I re-installed Python by checking the "py launcher". And it worked fine. – colab123 Jan 11, 2022 at 7:49 I confirm that it also works by just ticking "py launcher", all other options can be unchecked (if you don't need them for something else). – Sandra Rossi Oct 16, 2022 at 11:37

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.