Cannot find command 'git' - do you have 'git' installed and in your PATH? 해결 방법

ERROR: Error [WinError 2] 지정된 파일을 찾을 수 없습니다 while executing command git version
ERROR: Cannot find command 'git' - do you have 'git' installed and in your PATH?

Cannot find command 'git' - do you have 'git' installed and in your PATH? 해결하기

오류에 대해 해결해 봅시다. 첫 번째로 확인할 사항은 git 설치 여부를 알아보는 것이고, 두 번째로 의심해 볼 원인은 현재 실행 경로에서 git 실행파일을 인식할 수 없는 부분입니다.

Cannot find command 'git' - do you have 'git' installed and in your PATH

C:\Users\BEOMSANG\AppData\Local\Programs\Python\Python311\Scripts>pip install -r requirements.txt
Collecting git+https://github.com/openai/CLIP.git (from -r requirements.txt (line 8))
  Cloning https://github.com/openai/CLIP.git to c:\users\beomsang\appdata\local\temp\pip-req-build-mfflgqa9
  ERROR: Error [WinError 2] 지정된 파일을 찾을 수 없습니다 while executing command git version
ERROR: Cannot find command 'git' - do you have 'git' installed and in your PATH?

Git 설치하기

GitHub Desktop

Git 또는 GitHub Desktop을 설치하여 해결할 수 있습니다. Git은 버전 컨트롤 시스템이고, GitHub Desktop은 호스팅 서비스인데, 여기서 깃의 실행 파일 기능도 제공합니다. 이번 예제는 깃허브 데스크톱을 설치하도록 하는데, 본인에게 적합한 것을 다운로드하시면 됩니다.😘

Download for Windows를 완료하면 다음의 경로에 git.exe 파일이 설치되어 있을 것입니다. (버전 및 사용자 환경에 따라 달라질 수 있습니다.) cmd 폴더와 mingw64\bin 폴더에 설치되는 것을 확인하였는데, cmd에 있는 것을 사용해도 충분하며, 필요시 환경변수에 git.exe 경로를 설정합니다.

--깃허브 데스크톱 실행파일 설치 경로 예시
C:\Users\BEOMSANG\AppData\Local\GitHubDesktop

--cmd 폴더
C:\Users\BEOMSANG\AppData\Local\GitHubDesktop\app-3.1.2\resources\app\git\cmd

--mingw64 폴더 (MinGW)
C:\Users\BEOMSANG\AppData\Local\GitHubDesktop\app-3.1.2\resources\app\git\mingw64\bin

댓글