# CYGWIN git cannot install python packages with pip

10 messages from 2017-05-02 to 2017-05-16. Participants: ankostis, Johannes Schindelin, Adam Dinwoodie.
Thread: https://gitlist.dev/t/45851

## ankostis, 2017-05-02 18:08

Subject: CYGWIN git cannot install python packages with pip
Message-ID: <CA+dhYEX+GgEHnVBnLQqnNW99xpf9kWcataTTt3Ya6ivGFgscMw@mail.gmail.com>
URL: https://gitlist.dev/e/CA%2BdhYEX%2BGgEHnVBnLQqnNW99xpf9kWcataTTt3Ya6ivGFgscMw%40mail.gmail.com

```
On Windows, with Cygwin-git 02.12.2-1 the python command:

    pip install git+https://github.com/...`

fails to work with the following error:

    $ pip install git+https://github.com/ipython/traitlets/
    Collecting git+https://github.com/ipython/traitlets/
    Cloning https://github.com/ipython/traitlets/ to c:\users\username\appdata
\local\temp\pip-kjwxq_oy-build
    fatal: Invalid path '/cygdrive/d/Work/ALLINONES2/co2mpas_AIO-v1.6.0/CO2MPA
S/C:\Users\username\AppData\Local\Temp\pip-kjwxq_oy-build': No such file or di
rectory
    git clone -q https://github.com/ipython/traitlets/ C:\Users\user\AppData\L
ocal\Temp\pip-kjwxq_oy-build" failed with error code 128 in None



Git-2.8.3 had no such problem.

Any ideas?

```

## ankostis, 2017-05-02 18:40

Subject: Re: CYGWIN git cannot install python packages with pip
Message-ID: <CA+dhYEUYRc1PDio_JO=OPxwB+POTd2fOooTx1nKJFkUGqYK_Kg@mail.gmail.com>
URL: https://gitlist.dev/e/CA%2BdhYEUYRc1PDio_JO%3DOPxwB%2BPOTd2fOooTx1nKJFkUGqYK_Kg%40mail.gmail.com
In-Reply-To: <CA+dhYEX+GgEHnVBnLQqnNW99xpf9kWcataTTt3Ya6ivGFgscMw@mail.gmail.com>

```
Note that MSYS2 Git-12.2.1 also has no such problem.

On 2 May 2017 at 20:08, ankostis <ankostis@gmail.com> wrote:
> On Windows, with Cygwin-git 02.12.2-1 the python command:
>
>     pip install git+https://github.com/...`
>
> fails to work with the following error:
>
> ...
>
> Git-2.8.3 had no such problem.
>
> Any ideas?

```

## Johannes Schindelin, 2017-05-03 09:47

Subject: Re: CYGWIN git cannot install python packages with pip
Message-ID: <alpine.DEB.2.20.1705031147040.3480@virtualbox>
URL: https://gitlist.dev/e/alpine.DEB.2.20.1705031147040.3480%40virtualbox
In-Reply-To: <CA+dhYEX+GgEHnVBnLQqnNW99xpf9kWcataTTt3Ya6ivGFgscMw@mail.gmail.com>

```
Hi,


On Tue, 2 May 2017, ankostis wrote:

> On Windows, with Cygwin-git 02.12.2-1 the python command:
>
> [...]

You forgot to mention what python/pip you use (is it the Cygwin one, or a
standalone one?). Intentional?

Ciao,
Johannes

```

## ankostis, 2017-05-03 10:21

Subject: Re: CYGWIN git cannot install python packages with pip
Message-ID: <CA+dhYEUCJghqDQyBrL71Q=JKokcH-nhQ9WZzBb19-gonxi7o=Q@mail.gmail.com>
URL: https://gitlist.dev/e/CA%2BdhYEUCJghqDQyBrL71Q%3DJKokcH-nhQ9WZzBb19-gonxi7o%3DQ%40mail.gmail.com
In-Reply-To: <alpine.DEB.2.20.1705031147040.3480@virtualbox>

```
On 3 May 2017 11:47, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> On Tue, 2 May 2017, ankostis wrote:
>
>> On Windows, with Cygwin-git 02.12.2-1 the python command:
>> [...]
>
> You forgot to mention what python/pip you use (is it the Cygwin one, or a
> standalone one?). Intentional?

I have tested it on using WinPython[1] 3.6.1 & 3.5.3.
WinPython is built out of the "standard" python on Windows.

Judging by the error, the problem is on the temporary folder
used as target.  For some reason, Git uses $HOME
as a prefix to the temporary folder selected by `pip`.

My home in the above case above is this:
/cygdrive/d/Work/ALLINONES2/co2mpas_AIO-v1.6.0/CO2MPAS


Thanks,
  Kostis

[1] http://winpython.github.io/

```

## Johannes Schindelin, 2017-05-03 14:32

Subject: Re: CYGWIN git cannot install python packages with pip
Message-ID: <alpine.DEB.2.20.1705031630540.3480@virtualbox>
URL: https://gitlist.dev/e/alpine.DEB.2.20.1705031630540.3480%40virtualbox
In-Reply-To: <CA+dhYEUCJghqDQyBrL71Q=JKokcH-nhQ9WZzBb19-gonxi7o=Q@mail.gmail.com>

```
Hi,

On Wed, 3 May 2017, ankostis wrote:

> On 3 May 2017 11:47, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> > On Tue, 2 May 2017, ankostis wrote:
> >
> >> On Windows, with Cygwin-git 02.12.2-1 the python command:
> >> [...]
> >
> > You forgot to mention what python/pip you use (is it the Cygwin one,
> > or a standalone one?). Intentional?
> 
> I have tested it on using WinPython[1] 3.6.1 & 3.5.3.
> WinPython is built out of the "standard" python on Windows.

I am afraid that you run into path conversion problems here. /cygdrive/d/
is something Cygwin understands, but not WinPython nor Git for Windows.

It appears to be difficult to impossible to mix Cygwin with non-Cygwin
executables...

Ciao,
Johannes

```

## Adam Dinwoodie, 2017-05-04 09:47

Subject: Re: CYGWIN git cannot install python packages with pip
Message-ID: <20170504094719.GA3238@dinwoodie.org>
URL: https://gitlist.dev/e/20170504094719.GA3238%40dinwoodie.org
In-Reply-To: <alpine.DEB.2.20.1705031630540.3480@virtualbox>

```
On Wed, May 03, 2017 at 04:32:15PM +0200, Johannes Schindelin wrote:
> On Wed, 3 May 2017, ankostis wrote:
> 
> > On 3 May 2017 11:47, Johannes Schindelin wrote:
> > > On Tue, 2 May 2017, ankostis wrote:
> > >
> > >> On Windows, with Cygwin-git 02.12.2-1 the python command:
> > >> [...]
> > >
> > > You forgot to mention what python/pip you use (is it the Cygwin one,
> > > or a standalone one?). Intentional?
> > 
> > I have tested it on using WinPython[1] 3.6.1 & 3.5.3.
> > WinPython is built out of the "standard" python on Windows.
> 
> I am afraid that you run into path conversion problems here. /cygdrive/d/
> is something Cygwin understands, but not WinPython nor Git for Windows.
> 
> It appears to be difficult to impossible to mix Cygwin with non-Cygwin
> executables...

Confirmed: the Cygwin project as a general rule doesn't support this
sort of mixing of Windows and Cygwin tools.  Either use Python and Git
packages both provided by Cygwin, or both provided by Windows.

Mixing and matching does work sometimes -- as was apparently the case
with Cygwin Git v2.8.3-1 -- but it requires care and you're generally on
your own with it.

Adam

```

## ankostis, 2017-05-04 10:18

Subject: Re: CYGWIN git cannot install python packages with pip
Message-ID: <CA+dhYEX0f206pZ+7seOce7McnfZ9ZfXLvSn7YH3Ykgqk+gA8gg@mail.gmail.com>
URL: https://gitlist.dev/e/CA%2BdhYEX0f206pZ%2B7seOce7McnfZ9ZfXLvSn7YH3Ykgqk%2BgA8gg%40mail.gmail.com
In-Reply-To: <20170504094719.GA3238@dinwoodie.org>

```
On 4 May 2017 at 11:47, Adam Dinwoodie <adam@dinwoodie.org> wrote:
> Confirmed: the Cygwin project as a general rule doesn't support this
> sort of mixing of Windows and Cygwin tools.  Either use Python and Git
> packages both provided by Cygwin, or both provided by Windows.
>
> Mixing and matching does work sometimes -- as was apparently the case
> with Cygwin Git v2.8.3-1 -- but it requires care and you're generally on
> your own with it.

MSYS2's git-2.12.1 also works fine, so there must be something
different in this build of git that breaks this long-standing capability.

Judging from the error-message, it somehow concatenates input & output
paths.
Isn't this something to research about?

Regards, for your continuous effort,
  Kostis

```

## Johannes Schindelin, 2017-05-04 11:26

Subject: Re: CYGWIN git cannot install python packages with pip
Message-ID: <alpine.DEB.2.21.1.1705041324030.4905@virtualbox>
URL: https://gitlist.dev/e/alpine.DEB.2.21.1.1705041324030.4905%40virtualbox
In-Reply-To: <CA+dhYEX0f206pZ+7seOce7McnfZ9ZfXLvSn7YH3Ykgqk+gA8gg@mail.gmail.com>

```
Hi,

On Thu, 4 May 2017, ankostis wrote:

> On 4 May 2017 at 11:47, Adam Dinwoodie <adam@dinwoodie.org> wrote:
> > Confirmed: the Cygwin project as a general rule doesn't support this
> > sort of mixing of Windows and Cygwin tools.  Either use Python and Git
> > packages both provided by Cygwin, or both provided by Windows.
> >
> > Mixing and matching does work sometimes -- as was apparently the case
> > with Cygwin Git v2.8.3-1 -- but it requires care and you're generally on
> > your own with it.
> 
> MSYS2's git-2.12.1 also works fine, so there must be something
> different in this build of git that breaks this long-standing capability.

MSYS2's runtime has auto-conversion functionality, trying to guess what
arguments passed to a non-MSYS2 program may be Unix paths, converting them
to Windows ones.

So what you may see here has nothing to do with MSYS2's Git *not* having
the change that breaks Cygwin Git for you, but MSYS2's runtime saving you
from trouble.

> Judging from the error-message, it somehow concatenates input & output
> paths.
> Isn't this something to research about?

It is something to research about. But by you, not by me. I need to focus
on bigger-impact issues, because I do not scale, and Git for Windows'
users generally do not experience the problem you described.

Ciao,
Johannes

```

## ankostis, 2017-05-16 13:09

Subject: Re: CYGWIN git cannot install python packages with pip
Message-ID: <CA+dhYEVW1ozj17DT0Asz4iuLXQpCpEckOOqVBe2baLhmzmEopA@mail.gmail.com>
URL: https://gitlist.dev/e/CA%2BdhYEVW1ozj17DT0Asz4iuLXQpCpEckOOqVBe2baLhmzmEopA%40mail.gmail.com
In-Reply-To: <alpine.DEB.2.21.1.1705041324030.4905@virtualbox>

```
On 4 May 2017 at 13:26, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> Hi,
>
> On Thu, 4 May 2017, ankostis wrote:
>
>> On 4 May 2017 at 11:47, Adam Dinwoodie <adam@dinwoodie.org> wrote:
>> Judging from the error-message, it somehow concatenates input & output
>> paths.
>> Isn't this something to research about?
>
> It is something to research about. But by you, not by me.

You got a point there.

> I need to focus
> on bigger-impact issues, because I do not scale, and Git for Windows'
> users generally do not experience the problem you described.

Git for Windows uses MINGW indeed.
But there are still CYGWIN users out in the wild
running the vanilla Windows python installation.

Actually this issue has a big impact on those of us because
recent `setuptools` tools allow for packages to specify project dependencies
using the `git+https://...` url-scheme.
So the problem may appear to unaware users just trying to install
a packages the regular way, with `pip install foo.package`

Great thanks,
  Kostis

FYI, cross-posting also to CYGWIN list.

```

## ankostis, 2017-05-16 13:15

Subject: Re: CYGWIN git cannot install python packages with pip
Message-ID: <CA+dhYEWyyK=L7mHuYhyEc78FDs4fksMBwgY6mAErfGRL3mzu-A@mail.gmail.com>
URL: https://gitlist.dev/e/CA%2BdhYEWyyK%3DL7mHuYhyEc78FDs4fksMBwgY6mAErfGRL3mzu-A%40mail.gmail.com
In-Reply-To: <CA+dhYEX+GgEHnVBnLQqnNW99xpf9kWcataTTt3Ya6ivGFgscMw@mail.gmail.com>

```
On 2 May 2017 at 20:08, ankostis <ankostis@gmail.com> wrote:
> On Windows, with Cygwin-git 02.12.2-1 the python command:
>
>     pip install git+https://github.com/...`
>
> fails to work with the following error:
>
>     $ pip install git+https://github.com/ipython/traitlets/
>     Collecting git+https://github.com/ipython/traitlets/
>     Cloning https://github.com/ipython/traitlets/ to c:\users\username\appdata
> \local\temp\pip-kjwxq_oy-build
>     fatal: Invalid path '/cygdrive/d/Work/ALLINONES2/co2mpas_AIO-v1.6.0/CO2MPA
> S/C:\Users\username\AppData\Local\Temp\pip-kjwxq_oy-build': No such file or di
> rectory
>     git clone -q https://github.com/ipython/traitlets/ C:\Users\user\AppData\L
> ocal\Temp\pip-kjwxq_oy-build" failed with error code 128 in None
>
>
>
> Git-2.8.3 had no such problem.
>
> Any ideas?

Reporting for those bitten by this, latest working CYGWIN timemachine
release is on 16 March 2017:
  http://ctm.crouchingtigerhiddenfruitbat.org/pub/cygwin/circa/2017/04/16/142104/index.html

```
