Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem installing GitHub packages: "Cannot find command 'git' - do you have 'git' installed and in your PATH?" #3

Closed
TsvetalinGr opened this issue May 13, 2021 · 5 comments
Labels
troubleshooting Troubleshooting an issue windows This issue involves a virtual environment created in Windows

Comments

@TsvetalinGr
Copy link

Hi I have problems with setting up the book_env.

(book_env) C:\Users\TGrigorov>pip3 install -r %cd%\Documents\Python\Packt\Hands-On-Data-Analysis-with-Pandas-2nd-edition-master\requirements.txt
Collecting git+https://github.com/stefmolin/login-attempt-simulator.git@2nd_edition (from -r C:\Users\TGrigorov\Documents\Python\Packt\Hands-On-Data-Analysis-with-Pandas-2nd-edition-master\requirements.txt (line 15))
Cloning https://github.com/stefmolin/login-attempt-simulator.git (to revision 2nd_edition) to c:\users\tgrigorov\appdata\local\temp\pip-req-build-zgwb1xxn
Running command git clone -q https://github.com/stefmolin/login-attempt-simulator.git 'C:\Users\TGrigorov\AppData\Local\Temp\pip-req-build-zgwb1xxn'
ERROR: Error [WinError 2] Das System kann die angegebene Datei nicht finden while executing command git clone -q https://github.com/stefmolin/login-attempt-simulator.git 'C:\Users\TGrigorov\AppData\Local\Temp\pip-req-build-zgwb1xxn'
ERROR: Cannot find command 'git' - do you have 'git' installed and in your PATH?

I managed to install evrything till "wheel". But "login-attempt-simulator", "ml-utils", "stock-analysis" and "visual-aids" are not installed.

@stefmolin
Copy link
Owner

Hi @TsvetalinGr,

The error message is telling you that pip doesn't know where you have installed git. Can you confirm that you have git installed? It can be installed for Windows here.

@stefmolin stefmolin added question Further information is requested troubleshooting Troubleshooting an issue windows This issue involves a virtual environment created in Windows and removed question Further information is requested labels May 13, 2021
@tompearce
Copy link

(book_env) C:\Users\tompe\my_folder>pip3 install -r requirements.txt
Collecting git+https://github.com/stefmolin/login-attempt-simulator.git@2nd_edition (from -r requirements.txt (line 15))
Cloning https://github.com/stefmolin/login-attempt-simulator.git (to revision 2nd_edition) to c:\users\tompe\appdata\local\temp\pip-req-build-vc8wlanj
Running command git clone -q https://github.com/stefmolin/login-attempt-simulator.git 'C:\Users\tompe\AppData\Local\Temp\pip-req-build-vc8wlanj'
ERROR: Error [WinError 2] The system cannot find the file specified while executing command git clone -q https://github.com/stefmolin/login-attempt-simulator.git 'C:\Users\tompe\AppData\Local\Temp\pip-req-build-vc8wlanj'
ERROR: Cannot find command 'git' - do you have 'git' installed and in your PATH?

**Hi Stef

I am getting the same error. I have git installed but how do I let pip know where it is?**

@stefmolin
Copy link
Owner

stefmolin commented May 16, 2021

@tompearce - you need to add it to the PATH environment variable. Currently, pip is checking for git.exe in all the locations listed in PATH, but the location for the git executable is not there. I believe during installation of git you have the option to update PATH automatically, but you can do it at any time: find the filepath to git.exe on your local machine (for example, C:\Program Files\...\git\bin) and then add it to PATH (instructions here).

@tompearce
Copy link

@stefmolin -Great thanks. PATH updated and now all installed fine.

@stefmolin
Copy link
Owner

@TsvetalinGr - Were you able to resolve your issue?

@stefmolin stefmolin changed the title Problem with reqirements.txt Problem installing GitHub packages: "Cannot find command 'git' - do you have 'git' installed and in your PATH?" May 22, 2021
@stefmolin stefmolin pinned this issue May 22, 2021
Repository owner locked as resolved and limited conversation to collaborators Aug 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
troubleshooting Troubleshooting an issue windows This issue involves a virtual environment created in Windows
Projects
None yet
Development

No branches or pull requests

3 participants