20

I'm having a terrible time of getting pip up and running on Cygwin which I just recently installed on my Windows 7 Computer. I am writing in the hope that anyone out there can tell me what I am doing incorrectly in terms of getting these packages installed correctly.

To start, I followed the instructions on this site:

http://www.pip-installer.org/en/latest/installing.html

with setuptools installed prior to pip installation. I followed the steps, ran this command:

Ryan@Albert ~
$ python get-pip.py

got this output:

Downloading/unpacking pip
Downloading pip-1.5.tar.gz (898kB): 898kB downloaded
  Running setup.py egg_info for package pip

    warning: no files found matching 'pip/cacert.pem'
    warning: no files found matching '*.html' under directory 'docs'
    warning: no previously-included files matching '*.rst' found under direct
    no previously-included directories found matching 'docs/_build/_sources'
Installing collected packages: pip
  Running setup.py install for pip

    warning: no files found matching 'pip/cacert.pem'
    warning: no files found matching '*.html' under directory 'docs'
    warning: no previously-included files matching '*.rst' found under direct
    no previously-included directories found matching 'docs/_build/_sources'
    Installing pip script to /usr/bin
    Installing pip2.7 script to /usr/bin
    Installing pip2 script to /usr/bin
Successfully installed pip
Cleaning up...

and lo and behold, ran pip with this command:

Ryan@Albert ~
$ pip install --upgrade setuptools

which led to absolutely no output. A blank line appeared underneath for 3-4 seconds and then the input prompt came up again without pip actually doing anything. I did a bunch more testing to confirm that there was something called pip on my machine but anytime it ran, it essentially did nothing. It did not download or install any programs.

I went about trying to install pip another way after uninstalling the first version. This time I tried:

$ easy_install pip

And got the following output:

Searching for pip
Best match: pip 1.5
Adding pip 1.5 to easy-install.pth file
Installing pip script to /usr/bin
Installing pip2.7 script to /usr/bin
Installing pip2 script to /usr/bin

Using /usr/lib/python2.7/site-packages
Processing dependencies for pip
Finished processing dependencies for pip

Again, tried using pip to install virtualenv using this command:

$ pip install virtualenv

and it paused for 3-4 seconds, then made the command prompt available again. Exactly like the previous time. When I checked to see whether virtualenv was installed, it was not.

Essentially I have tried and tried to get pip up and running on my windows 7 Cygwin install but to no avail. I am aware of the fact that I can use other packages to install plugins and so forth but I would really appreciate it if someone had any knowledge on why this was happening so it doesn't plague me when I try to install stuff further on down the line.

Any help would be greatly appreciated!

whotemp
  • 197
  • 1
  • 3
  • 11
rrphenix
  • 235
  • 1
  • 3
  • 9
  • 1
    Out of curiosity, given what you're trying to do, why are you trying to do it solely under Cygwin? Considering that Cygwin is "a DLL (cygwin1.dll) which acts as a Linux API layer providing substantial Linux API functionality", it's a better idea to simply install Python *for Windows* instead, and install `pip` and `virtualenv` that way. Or, install Python in a Virutal environment / *nix based OS. – jrd1 Jan 11 '14 at 07:06
  • Hmm, I already have a version of Python installed in Windows configured how I like it. When I tried to use it, (i.e. import numpy or something) the installed features don't work. I am assuming it is because my path file links to the cygwin version on python instead of the previously installed Windows version. How would you suggest that I get Cygwin to use my windows install? Just uninstall the cygwin python and modify the path file to include the windows folder containing my windows python install? – rrphenix Jan 14 '14 at 04:21
  • You can bypass the Cygwin install by calling the Windows install directly. Did you try to use the Windows `cmd` prompt (Press Win+R and type `cmd` then hit Enter) and call your Windows installed Python and `pip` install like this? (E.g.: `C:\Python27\Scripts\pip.exe install virtualenv`) – jrd1 Jan 14 '14 at 05:17
  • 1
    Ahhh great! You saved the day. I ended up going around Cygwin installs just using windows file paths as you suggested (i.e. `$ /cygdrive/c/Users/Ryan/Anaconda/Scripts/pip.exe install virtualenv`) and installed the packages directly on windows. Using this strategy i got everything installed in a matter of seconds. Thanks again! – rrphenix Jan 14 '14 at 17:37

3 Answers3

24

There's a bug(?) in 64-bit Cygwin which causes ctypes.util to segfault when trying to find libuuid (/usr/bin/cyguuid-1.dll). The fix is to install libuuid-devel from Cygwin setup. I found this from an issue filed against requests.py, but it's noted (and worked around in different ways) in a few other places, too.

Tripp Lilley
  • 1,653
  • 16
  • 21
  • 3
    Man you are a godsend! – CMCDragonkai May 02 '14 at 08:27
  • This solved my problem too. Thank you! But I had binutils already installed from before, so I don't know, if it's also required. – David Ferenczy Rogožan Jun 04 '14 at 15:46
  • @DawidFerenczy: I'm not sure... I, too, already had binutils installed :-) Also: thanks! You just pushed me over 1000 rep! – Tripp Lilley Jun 04 '14 at 21:30
  • 1
    I don't know why, but having those packages installed does not solve the problem for me. I would sit waiting for >30 minutes; by then I assume the program has hung indefinitely. Interestingly, adding -vvv to the arguments reveals that it hangs on the new HTTPS phase. – PikalaxALT May 09 '15 at 13:25
4

Came across the same problem. Installation of binutils cygwin package solved it for me.

Ivan Ponomarev
  • 442
  • 5
  • 11
  • I don't know why the previous answer is downvoted so much. I got here trying to figure out why pip install -r REQUIREMENTS.txt did absolutely nothing on Cygwin64 (not even an error message). I installed the binutils package, and miraculously it began working. – cardonator Apr 10 '14 at 16:47
0

There is a work around for this problem: you can pipe the output to another process or to redirect it to file.

For example:

pip | more

Usage:
  pip <command> [options]

Commands:
  install                     Install packages.
  uninstall                   Uninstall packages.
  freeze                      Output installed packages in requirements format.
  list                        List installed packages.
  show                        Show information about installed packages.
  search                      Search PyPI for packages.
  wheel                       Build wheels from your requirements.
  help                        Show help for commands.

This will allow seeing stdout, but not stderr. In order to see stderr it also should be redirected:

pip 2>&1 | more
Denis Itskovich
  • 4,383
  • 3
  • 32
  • 53