Error cannot find command git do you have git installed and in your path pycharm

Problem installing GitHub packages: «Cannot find command ‘git’ — do you have ‘git’ installed and in your PATH?» #3 Comments Hi I have problems with setting up the book_env. (book_env) C:UsersTGrigorov>pip3 install -r %cd%DocumentsPythonPacktHands-On-Data-Analysis-with-Pandas-2nd-edition-masterrequirements.txt Collecting git+https://github.com/stefmolin/login-attempt-simulator.git@2nd_edition (from -r C:UsersTGrigorovDocumentsPythonPacktHands-On-Data-Analysis-with-Pandas-2nd-edition-masterrequirements.txt (line 15)) Cloning https://github.com/stefmolin/login-attempt-simulator.git (to revision 2nd_edition) to c:userstgrigorovappdatalocaltemppip-req-build-zgwb1xxn Running command git clone -q https://github.com/stefmolin/login-attempt-simulator.git […]

Содержание

  1. Problem installing GitHub packages: «Cannot find command ‘git’ — do you have ‘git’ installed and in your PATH?» #3
  2. Comments
  3. pip list yields Cannot find command ‘git’ #2109
  4. Comments
  5. Python Pip Install From Github
  6. What Is Pip
  7. What Is Github
  8. Pip Install Directly From Github
  9. Additional Resources
  10. Install Git
  11. Установка Git в PATH с клиентом GitHub для Windows
  12. Обновлен для рабочего стола Github

Problem installing GitHub packages: «Cannot find command ‘git’ — do you have ‘git’ installed and in your PATH?» #3

Hi I have problems with setting up the book_env.

(book_env) C:UsersTGrigorov>pip3 install -r %cd%DocumentsPythonPacktHands-On-Data-Analysis-with-Pandas-2nd-edition-masterrequirements.txt
Collecting git+https://github.com/stefmolin/login-attempt-simulator.git@2nd_edition (from -r C:UsersTGrigorovDocumentsPythonPacktHands-On-Data-Analysis-with-Pandas-2nd-edition-masterrequirements.txt (line 15))
Cloning https://github.com/stefmolin/login-attempt-simulator.git (to revision 2nd_edition) to c:userstgrigorovappdatalocaltemppip-req-build-zgwb1xxn
Running command git clone -q https://github.com/stefmolin/login-attempt-simulator.git ‘C:UsersTGrigorovAppDataLocalTemppip-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:UsersTGrigorovAppDataLocalTemppip-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.

The text was updated successfully, but these errors were encountered:

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.

Источник

pip list yields Cannot find command ‘git’ #2109

Running the command pip list I get the error Cannot find command ‘git’ , which is true. I don’t have git available to this shell (and don’t want it available). Why is pip trying to use git when it shouldn’t be necessary? and more importantly, how do I work around it?

Python 2.7.4 (32bit)
Windows 7 x64.

Contents of pip.log:

The text was updated successfully, but these errors were encountered:

What version of pip are you running? This looks like a possible duplicate of bug #930 which was fixed last year.

I figured out this occurs whenever a package has been installed from a git repository, even if git wasn’t used to do the install. To reproduce:

. weirdness. pip —version reported 1.5.6, but when I inspected site-packages folder there was a dev 1.6 in the folder list. I deleted everything pip related in libsite-packages and Scripts and re-installed from a current get-pip.py . The version still self reports as 1.5.6 but I no longer get the git not found error.

However, now any packages installed from a git clone folder do not appear in pip list output.

«However, now any packages installed from a git clone folder do not appear in pip list output.»

. scratch that. That did happen, with two different packages in two trials, but when I went verify the recipe for 3rd and 4rth time before posting here I couldn’t reproduce it anymore.

Источник

Python Pip Install From Github

Python users are familiar with pip install, but do you know that we can actually install a library found on github? The most common usage of pip is to install a library from PyPI (Python Package Index). However, not all great libraries exist on PyPI, some authors might choose to just leave their library on a Github page for example.

What Is Pip

pip is a package management software written in Python. It’s one of the most common ways to install 3rd party Python libraries on your computer. It’s also simple to use, most of the time just takes 2 steps:

  1. Open up a command prompt (or terminal) window
  2. Type “pip install [library_name]”

The above command will download the pandas library from PyPI and install it on our computer. If a library doesn’t exist on PyPI, then we have to do something else.

What Is Github

git is a version control system mainly used for code/text files. It’s like how most people manage Excel files by adding the “_v1”, “_v2”, etc at the end of their files, but 100 times better.

Github is a website that hosts the git software in the cloud so that people from different places can access code from anywhere with internet access. There are other companies provide git and version control hosting, but Github is The Player in the field. According to Wikipedia, 73 million people around the world use Github at the end of 2021. In other words, we can find a lot of cool software, including Python libraries, on Github.

Pip Install Directly From Github

Before you attempt the following, make sure that you have both installed:

  1. Python / pip
  2. git (if you need help with installation, check out the Install Git section at the bottom)

We still use the command prompt/terminal window to install, but the syntax is like this:

pip install git+https://github.com/[user name]/[repo].git@[branch]

Here’s an example of installing a library called bar_chart_race. Note there’s a version of the library on PyPI, if you type “pip install bar_chart_race”, then it’s going to grab the version on PyPI and install that. We are going to install a variant of the library which is found on another Github repository.

See below, we can get the user name, repo name, and the branch name from any given repository URL.

To pip install this specific version of the bar_chart_race directly from Github, we’ll need to type the following command into the terminal window:

If you get an error message like this:

ERROR: Error [WinError 2] The system cannot find the file specified while executing command git version
ERROR: Cannot find command ‘git’ — do you have ‘git’ installed and in your PATH?

It means you probably don’t have git installed. You can follow the below section to install git first. Close and then re-open a new command prompt/terminal window and type pip install git+… again. It should work now!

Additional Resources

Install Git

To install git, head over to the official website: https://git-scm.com/. Download and install the latest version that fits your computer’s operating system.

The installation wizard will ask you quite a few questions, I’ll help guide you through:

  1. Select Components – default settings are fine

2. Choosing editor – this is for when you need to edit things for git, for example adding comments. Feel free to choose any editor from the list below. I’m using Visual Studio Code for this option.

3. For the next several windows, I’ll be using the default options.

Источник

Установка Git в PATH с клиентом GitHub для Windows

Как установить Git в мой PATH при использовании клиента GitHub для Windows?

Я сталкиваюсь с ошибками, потому что, по-видимому, Git не установлен в PATH. Например, используя Atom, попытка установки плагина Linter дает эту ошибку:

Установляет ли GitHub для Windows установку Git при ее установке? (Он должен, в противном случае, как он использует Git?) Я не хочу его дважды устанавливать… так как я могу просто добавить Git, который уже существует в PATH?

GitHub для Windows действительно устанавливает собственную версию Git, но не добавляет ее в переменную PATH , что достаточно просто сделать. Здесь инструкции о том, как это сделать:

Получить Git URL

Нам нужно получить URL-адрес каталога Git cmd на вашем компьютере. Git находится здесь:

Итак, на вашем компьютере замените на пользователя и узнайте, что означает для вашего компьютера. ( guid может меняться каждый раз, когда GitHub обновляет PortableGit, но они работают над решением этого.)

Скопируйте его и вставьте в командную строку (щелкните правой кнопкой мыши > вставить для вставки в терминал), чтобы убедиться, что он работает. Вы должны увидеть ответ Git help, в котором перечислены общие команды Git. Если вы видите The system cannot find the path specified. Тогда URL-адрес не прав. Как только вы это сделаете правильно, создайте ссылку на каталог, используя этот формат:

(Примечание: cmd в конце, а не cmdgit.exe больше!)

В моей системе это, ваше, ваше будет другим:

Изменить переменную PATH

Перейдите к редактору переменных окружения (инструкции) и найдите переменную PATH в разделе “Системные переменные”. Нажмите Edit… и вставьте URL-адрес Git в конец этой строки. Сохранить! Возможно, было бы проще сделать это в “Блокноте”, чтобы сделать редактирование, просто убедитесь, что вы положили одну точку с запятой, прежде чем вставлять URL. Если это не работает, вероятно, потому, что этот путь перепутался либо с пространством где-то (не должно быть пробелов вокруг точки с запятой), либо точкой с запятой в конце (точки с запятой должны только отделять URL-адреса, точки с запятой не начинаться или не заканчиваться строка).

Если это сработало, вы сможете закрыть и снова открыть терминал и набрать git , и он предоставит вам тот же файл справки Git. Тогда установка Linter должна работать. (Atom > Файл > Настройки > Пакеты > Linter)

Я хотел бы добавить еще одну вещь к тому, что сказали другие ответы. Не обязательно, чтобы путь был:

C:Users AppDataLocalGitHubPortableGit_ bingit.exe

В моем компьютере я не нашел Git там.

НО git и cmd находятся в

git.exe

CMD

Чтобы добавить в PATH:

  • Щелкните правой кнопкой мыши на моем компьютере.
  • Нажмите “Дополнительные параметры системы”
  • Нажмите “Переменные среды”
  • Затем в разделе “Системные переменные” найдите переменную пути и нажмите “Изменить”

Добавьте путь к git s bin и cmd в конце строки следующим образом:

;C:Program FilesGitbingit.exe;C:Program FilesGitcmd

ИЛИ

;C:Users AppDataLocalGitHubPortableGit_ bin;C:Users AppDataLocalGitHubPortableGit_ cmd

Чтобы проверить, перезапустите cmd и введите git —version в cmd

Я установил GitHubDesktop в Windows 10, и git.exe находится там: C:UsersjohnAppDataLocalGitHubDesktopapp-0.7.2resourcesappgitcmdgit.exe

Git s исполняемый файл фактически находится в:
C:Users AppDataLocalGitHubPortableGit_ bingit.exe

Теперь, когда мы нашли исполняемый файл, все, что нам нужно сделать, это добавить его в наш PATH:

  • Щелкните правой кнопкой мыши на моем компьютере.
  • Нажмите “Дополнительные системные настройки”
  • Выберите переменные среды
  • Затем в разделе “Системные переменные” найдите переменную пути и нажмите “Изменить”
  • Добавьте путь к git s bin и cmd в конце строки следующим образом:

;C:Users AppDataLocalGitHubPortableGit_ bin;C:Users AppDataLocalGitHubPortableGit_ cmd

Просто установите git по этой ссылке Download Git, затем установите его на свой компьютер, затем откройте настройку переменной среды, затем добавьте новую переменную и добавьте этот путь

Спасибо, надеюсь, это поможет вам.

Спасибо всем, кто ответил. Я видел все ответы и постараюсь сделать так, чтобы каждому было легко

Шаг 1: Введите среду редактирования и выберите показанную опцию

Шаг 2: Выберите Path и нажмите на edit

Шаг 3: В конце добавьте приведенное ниже утверждение (вы можете избежать первого; если оно уже есть)

Шаг 4: – Нажмите на ОК

Шаг 5 **: – Один из важных шагов, который выделен одним из пользователей. Спасибо ему. Пожалуйста, ** ЗАКРЫТЬ командную строку и REOPEN, затем попробуйте написать git.

  • Закройте командную строку и перезапустите, прежде чем пробовать приведенную ниже команду

Просматривая несколько сообщений. В Windows 10, загрузив и установив Github для Windows 2.10.2, я нашел git.exe в

Обратите внимание на изменение папки “Программы” в “Местный” из вышеуказанных сообщений.

GitHub для Windows теперь является рабочим столом GitHub.

Если у вас есть GitHub для Windows (до версии 1.1), ваш путь должен быть:

C:Users AppDataLocalGitHubPortableGit_ cmd

Если у вас есть GitHub Desktop (начиная с версии 1.1), ваш путь должен быть:

C:Users AppDataLocalGitHubDesktopapp- resourcesappgitcmd

После подтверждения и копирования вашего пути сделайте следующее:

  • Щелкните правой кнопкой мыши на Мой компьютер или этот компьютер
  • Нажмите на свойства
  • Нажмите на Дополнительные настройки системы
  • Нажмите “Переменные среды” на вкладке “Дополнительно”.
  • Добавьте свой путь с помощью ; перед ним в переменной Path
  • Нажмите Ok
  • Используйте новый терминал

Чтобы это сработало, мне пришлось объединить многие из вышеперечисленных ответов, всем, кто может помочь здесь, это мой более простой процесс.

Если у вас Windows 10, просто начните вводить “редактировать окружающую среду…”, и он появится сразу. Путь клика и Изменить… затем вставьте ;C:Program FilesGitbingit.exe;C:Program FilesGitcmd
в конце пути, уже там, не забывайте; чтобы отделить ваш новый путь github от текущего пути.

Вам не нужен указатель, но если вы хотите узнать, как его открыть, bash, введите git —man-path

Обновлен для рабочего стола Github

Поиск вверх “Редактировать переменные системной среды” в окне поиска

Нажмите на переменную окружения в правом нижнем углу.

Найдите путь по системным переменным и нажмите на него править

Нажмите “Новый”, чтобы добавить новый путь

добавить этот путь: C:UsersyourUserNameAppDataLocalGitHubDesktopbingithub.exe

Чтобы убедиться, что все работает нормально, откройте cmd и введите github.exe

Если вы используете SmartGit в Windows, исполняемый файл может быть здесь:

C:Program FilesGitbingit.exe; C:Program FilesGitcmd; C:WindowsSystem32 в вашей переменной PATH

Не создавайте новую переменную для git, а добавляйте их, как я делал один за другим, разделяя их;

Если вы используете терминал vscode, он может не работать, даже если вы используете переменную окружения, протестируйте, набрав git

Источник

I am trying to install mongodb_engine with my python django application, however I am getting this error

Cannot find command 'git'

I am trying this command from mongodb documentation. http://django-mongodb-engine.readthedocs.org/en/latest/topics/setup.html

pip install git+https://github.com/django-nonrel/django@nonrel-1.5

I believe git here is causing the problem since the project is stored in git repo. Is there a way to install git to run this pip command? I tried multiple sources but wasn’t able to get it to work.

Tim Stack's user avatar

Tim Stack

3,1993 gold badges18 silver badges38 bronze badges

asked Apr 10, 2015 at 15:55

ETS's user avatar

1

If your using Anacoda, then you can try this

conda install git

answered Mar 31, 2018 at 14:26

Naveen Nair's user avatar

Naveen NairNaveen Nair

6191 gold badge5 silver badges7 bronze badges

2

Download and Install git in your windows from here:

https://git-scm.com/download/win

Then add its installation bin path to your windows’s environment path. Then you will find the git command at the command prompt globally.

This may solve you problem.

How to change environment variables : Git: Installing Git in PATH with GitHub client for Windows

For Visual studio code restart after adding the environment variables

Vivek Amirthakadeswaran's user avatar

answered Apr 10, 2015 at 16:02

Imran's user avatar

ImranImran

4,4922 gold badges18 silver badges37 bronze badges

1

Add the path of git.exe to your windows environment variable called ‘path’.
My git.exe is in the path of ‘C:UsersLWAppDataLocalGitHubPortableGit_c2ba306e536fdf878271f7fe636a147ff37326adbingit.exe’. Your can find your exe file in the similar folder path.

answered Apr 14, 2016 at 10:03

sea_breathe's user avatar

You can install git and configure the path with the git directory in System variables path.

answered Jan 10, 2020 at 1:19

Vamsi Mohan's user avatar

2

Environment

  • pip version: 19.0.3
  • Python version: 3.7.2
  • OS: Windows 10

Description

pip can’t find git though I am able to use it from the command line.

Expected behavior

pip should be able to locate and use git on my path.

How to Reproduce

I try to install a repo from GitHub and git isn’t found:

>pip install git+https://github.com/neighthan/invoke
Collecting git+https://github.com/neighthan/invoke
  Cloning https://github.com/neighthan/invoke to c:usersneighappdatalocaltemppip-req-build-440_w7oa
  Error [WinError 2] The system cannot find the file specified while executing command git clone -q https://github.com/neighthan/invoke C:UsersneighAppDataLocalTemppip-req-build-440_w7oa
Cannot find command 'git' - do you have 'git' installed and in your PATH?

But if I run the suggest command myself, it works fine:

>git clone -q https://github.com/neighthan/invoke C:UsersneighAppDataLocalTemppip-req-build-440_w7oa
>dir C:UsersneighAppDataLocalTemppip-req-build-440_w7oa
 Volume in drive C is Local Disk
 Volume Serial Number is 2425-DB64

 Directory of C:UsersneighAppDataLocalTemppip-req-build-440_w7oa

02/22/2019  01:24 AM    <DIR>          .
02/22/2019  01:24 AM    <DIR>          ..
02/22/2019  01:24 AM                62 .coveragerc
02/22/2019  01:24 AM    <DIR>          .git
02/22/2019  01:24 AM                89 .gitignore
02/22/2019  01:24 AM             2,618 .travis.yml
02/22/2019  01:24 AM    <DIR>          appveyor
02/22/2019  01:24 AM               359 appveyor.yml
02/22/2019  01:24 AM                91 codecov.yml
02/22/2019  01:24 AM               405 dev-requirements.txt
02/22/2019  01:24 AM    <DIR>          integration
02/22/2019  01:24 AM    <DIR>          invoke
02/22/2019  01:24 AM             1,314 LICENSE
02/22/2019  01:24 AM               273 MANIFEST.in
02/22/2019  01:24 AM               515 README.rst
02/22/2019  01:24 AM               222 setup.cfg
02/22/2019  01:24 AM             2,517 setup.py
02/22/2019  01:24 AM    <DIR>          sites
02/22/2019  01:24 AM               553 tasks-requirements.txt
02/22/2019  01:24 AM             3,206 tasks.py
02/22/2019  01:24 AM    <DIR>          tests
02/22/2019  01:24 AM             6,621 THOUGHTS.rst
02/22/2019  01:24 AM               347 tox.ini
              15 File(s)         19,192 bytes
               8 Dir(s)  30,164,561,920 bytes free

Why can’t pip find git when I can use it from the command line? Note — I do have a very strange git «installation». I have a git.cmd file in a directory on my path which makes calls to the git installation I have on Windows Subsystem for Linux. However, as shown above, this does properly clone the repo, and I certainly have something on my path that runs when I call git. Why is this not showing up at all to pip?

1 / 0 / 1

Регистрация: 07.08.2018

Сообщений: 80

1

14.12.2019, 00:10. Показов 6191. Ответов 2


крч, устанавливая библиотеку через гит, но выдаёт ошибку
кто сможет помочь?

Код

C:UsersKvaksManYT>pip install git+https://github.com/KvaksMan/adcom.git
Collecting git+https://github.com/KvaksMan/adcom.git
  Cloning https://github.com/KvaksMan/adcom.git to c:userskvaksm~1appdatalocaltemppip-req-build-1d331k2f
  Running command git clone -q https://github.com/KvaksMan/adcom.git 'C:UsersKVAKSM~1AppDataLocalTemppip-req-build-1d331k2f'
  ERROR: Error [WinError 2] Не удается найти указанный файл while executing command git clone -q https://github.com/KvaksMan/adcom.git 'C:UsersKVAKSM~1AppDataLocalTemppip-req-build-1d331k2f'
ERROR: Cannot find command 'git' - do you have 'git' installed and in your PATH?

__________________
Помощь в написании контрольных, курсовых и дипломных работ, диссертаций здесь



0



Эксперт Python

5403 / 3827 / 1214

Регистрация: 28.10.2013

Сообщений: 9,554

Записей в блоге: 1

14.12.2019, 01:31

2

Цитата
Сообщение от KvaksManYT
Посмотреть сообщение

Cannot find command ‘git’ — do you have ‘git’ installed and in your PATH?

Не удается найти команду «git» — у вас установлен » git » и он есть в вашем PATH?
P.S. Это не я спрашиваю — это Python интересуется.
Для справки: git это самостоятельная программа, которая не входит в поставку Python.



0



1 / 0 / 1

Регистрация: 07.08.2018

Сообщений: 80

14.12.2019, 16:23

 [ТС]

3

Цитата
Сообщение от Garry Galler
Посмотреть сообщение

Не удается найти команду «git» — у вас установлен » git » и он есть в вашем PATH?
P.S. Это не я спрашиваю — это Python интересуется.
Для справки: git это самостоятельная программа, которая не входит в поставку Python.

установлен

но где его добавить в PATH?



0



IT_Exp

Эксперт

87844 / 49110 / 22898

Регистрация: 17.06.2006

Сообщений: 92,604

14.12.2019, 16:23

3

Add Answer
|
View In TPC Matrix

Technical Problem Cluster First Answered On
October 9, 2020

Popularity
9/10

Helpfulness
6/10


Contributions From The Grepper Developer Community

Contents

Code Examples

  • ERROR: Cannot find command ‘git’ — do you have ‘git’ installed and in your PATH?
  • Related Problems

  • cannot find command ‘git’ — do you have ‘git’ installed and in your path?
  • install git command line
  • TPC Matrix View Full Screen

    ERROR: Cannot find command ‘git’ — do you have ‘git’ installed and in your PATH?

    Comment

    -1


    Popularity

    9/10 Helpfulness
    6/10
    Language
    shell

    Source: Grepper

    Tags: command
    find
    shell

    Sachin

    Contributed on Oct 09 2020

    Sachin

    224 Answers  Avg Quality 7/10


    Понравилась статья? Поделить с друзьями:

    Читайте также:

  • Error cannot find any interfaces in mode monitor
  • Error cannot find adb fastboot downloading the latest version
  • Error cannot find a valid baseurl for repo base centos 6
  • Error cannot execute insert in a read only transaction
  • Error cannot execute grant in a read only transaction

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии