requests icon indicating copy to clipboard operation
requests copied to clipboard

Installation fails in Cygwin 64 bit

Open gregersn opened this issue 13 years ago • 54 comments

When I try a pip install requests in Cygwin 64 bit the installation fails.

Here's the end of the log file:

  Downloading from URL https://pypi.python.org/packages/source/r/requests/requests-1.2.3.tar.gz#md5=adbd3f18445f7fe5e77f65c502e264fb (from https://pypi.python.org/simple/requests/)
  Running setup.py egg_info for package requests

Cleaning up...

  Removing temporary dir /cygdrive/d/home/greger/cygwin/projects/myproject/build...
No files/directories in /cygdrive/d/home/greger/cygwin/projects/myproject/build/requests/pip-egg-info (from PKG-INFO)

Exception information:
Traceback (most recent call last):
  File "/cygdrive/d/home/greger/cygwin/projects/myproject/lib/python2.7/site-packages/pip/basecommand.py", line 134, in main
    status = self.run(options, args)
  File "/cygdrive/d/home/greger/cygwin/projects/myproject/lib/python2.7/site-packages/pip/commands/install.py", line 236, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/cygdrive/d/home/greger/cygwin/projects/myproject/lib/python2.7/site-packages/pip/req.py", line 1139, in prepare_files
    req_to_install.assert_source_matches_version()
  File "/cygdrive/d/home/greger/cygwin/projects/myproject/lib/python2.7/site-packages/pip/req.py", line 394, in assert_source_matches_version
    version = self.installed_version
  File "/cygdrive/d/home/greger/cygwin/projects/myproject/lib/python2.7/site-packages/pip/req.py", line 390, in installed_version
    return self.pkg_info()['version']
  File "/cygdrive/d/home/greger/cygwin/projects/myproject/lib/python2.7/site-packages/pip/req.py", line 357, in pkg_info
    data = self.egg_info_data('PKG-INFO')
  File "/cygdrive/d/home/greger/cygwin/projects/myproject/lib/python2.7/site-packages/pip/req.py", line 293, in egg_info_data
    filename = self.egg_info_path(filename)
  File "/cygdrive/d/home/greger/cygwin/projects/myproject/lib/python2.7/site-packages/pip/req.py", line 330, in egg_info_path
    raise InstallationError('No files/directories in %s (from %s)' % (base, filename))
InstallationError: No files/directories in /cygdrive/d/home/greger/cygwin/projects/myproject/build/requests/pip-egg-info (from PKG-INFO)

Don't know if that is a problem with the installation package, or cygwin itself. But thought I'd try here first.

If I try to use easy_install it just leaves all the files in the tmp-dir. And if I from there try to do a python setup.py install, and then try to import requests from the python shell, it just exits without and output.

gregersn avatar Aug 21 '13 22:08 gregersn

Hmm, I can't reproduce this. =( But I wonder if you're using a Windows virtualenv with a Windows interpreter in Cygwin. It's not clear (to me) how well that would work.

Lukasa avatar Aug 27 '13 08:08 Lukasa

You are right, I did try through VirtualEnv and with VirtualenvWrapper. Tried again now from just regular cygwin prompt, and here's the log, again:

  Downloading from URL https://pypi.python.org/packages/source/r/requests/requests-1.2.3.tar.gz#md5=adbd3f18445f7fe5e77f65c502e264fb (from https://pypi.python.org/simple/requests/)
  Running setup.py egg_info for package requests

Cleaning up...

  Removing temporary dir /tmp/pip_build_greger...
No files/directories in /tmp/pip_build_greger/requests/pip-egg-info (from PKG-INFO)

Exception information:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pip-1.4.1-py2.7.egg/pip/basecommand.py", line 134, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/site-packages/pip-1.4.1-py2.7.egg/pip/commands/install.py", line 236, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/lib/python2.7/site-packages/pip-1.4.1-py2.7.egg/pip/req.py", line 1139, in prepare_files
    req_to_install.assert_source_matches_version()
  File "/usr/lib/python2.7/site-packages/pip-1.4.1-py2.7.egg/pip/req.py", line 394, in assert_source_matches_version
    version = self.installed_version
  File "/usr/lib/python2.7/site-packages/pip-1.4.1-py2.7.egg/pip/req.py", line 390, in installed_version
    return self.pkg_info()['version']
  File "/usr/lib/python2.7/site-packages/pip-1.4.1-py2.7.egg/pip/req.py", line 357, in pkg_info
    data = self.egg_info_data('PKG-INFO')
  File "/usr/lib/python2.7/site-packages/pip-1.4.1-py2.7.egg/pip/req.py", line 293, in egg_info_data
    filename = self.egg_info_path(filename)
  File "/usr/lib/python2.7/site-packages/pip-1.4.1-py2.7.egg/pip/req.py", line 330, in egg_info_path
    raise InstallationError('No files/directories in %s (from %s)' % (base, filename))
InstallationError: No files/directories in /tmp/pip_build_greger/requests/pip-egg-info (from PKG-INFO)

gregersn avatar Aug 27 '13 08:08 gregersn

Tested again in a clean installed Cygwin64 bit, same error. It does work in 32 bit version of Cygwin, though.

gregersn avatar Aug 27 '13 08:08 gregersn

That's truly bizarre. It looks like pip is being installed as part of Cygwin, so you shouldn't have any 32/64 bit problems, but I kinda have to believe you are.

Lukasa avatar Aug 27 '13 08:08 Lukasa

I did install pip with easy_install , so the problem might lay there. Still a bit weird, since pip has no problem installing lots of other packages.

gregersn avatar Aug 27 '13 09:08 gregersn

I was under the impression pip was broken on Windows but I'm probably stuck in the past.

sigmavirus24 avatar Aug 29 '13 13:08 sigmavirus24

Pip works fine on Windows, and in my experience is fine in Cygwin too. Except for this.

Lukasa avatar Aug 29 '13 15:08 Lukasa

same here the requests not install behind cygwin

zodman avatar Aug 29 '13 21:08 zodman

I'm getting the same behavior as the OP: "pip install requests" works on 32 bit cygwin, but fails on 64 bit cygwin with messages about "no files/directories".

Possibly unrelated, but installation-relevant & equally mysterious: 64 bit cygwin wget fails to verify certs for https URLs, while 32 bit cygwin wget succeeds. (Certs are identical on each install, and running the 32 bit wget inside a 64 bit installation [including /usr/ssl/certs directory] works, too.) Anyway, what I'm saying is that installing python stuff under 64 bit cygwin has been a pain in the butt, and I'm keen to hear solutions.

meeotch avatar Sep 09 '13 03:09 meeotch

This sounds like an issue with pip itself.

kennethreitz avatar Sep 09 '13 09:09 kennethreitz

I like the way you think @kennethreitz. :P

It sounds more to me, however, that 64 bit cygwin is broken (maybe).

sigmavirus24 avatar Sep 09 '13 11:09 sigmavirus24

Same thing here. Very interested if someone finds a solution.

jice-lavocat avatar Sep 22 '13 03:09 jice-lavocat

Have any details you can add @tanzaho ?

sigmavirus24 avatar Sep 22 '13 04:09 sigmavirus24

I get the following when run on cygwin64 and trying to pip install the module : Downloading requests-1.2.3.tar.gz (348kB): 348kB downloaded Running setup.py egg_info for package requests Cleaning up... No files/directories in /home/tanzaho/.virtualenvs/django_wordiz/build/requests/pip-egg-info (from PKG-INFO)

jice-lavocat avatar Sep 22 '13 04:09 jice-lavocat

I'm a bit new to running python setup scripts, especially under 64 bit cygwin in Windows 8. But firewall issues forced me to download the requests-1.2.3.tar.gz file by hand (I couldn't use pip or easy_install without timeouts). I gunzipped and untarred the file and then went in to the directory and ran:

python setup.py install

by hand, and it doesn't output anything and returns to the prompt. Nothing is created in any of the cygwin /usr/lib/python*/site-packages directories. So I think that the process for running the above command is broken rather than it being a connectivity problem or a problem with pip itself. So, you probably don't need to reproduce any network problems to reproduce this problem. Just try to do the above and see if you get the same thing when installing from the command line in a cygwin terminal.

Would like to see this fixed too, as pip and easy_install aren't options for me to install libraries.

Also, I get core dumps if I try to execute the command above with "python3" or "python3.2" instead of "python".

mikewn avatar Sep 24 '13 02:09 mikewn

Also, I get core dumps if I try to execute the command above

@mikewn could you provide those? I'm wondering if this isn't an issue in the way Python is built for Windows now. I don't have a windows box to test with though. (Also I didn't know anyone was willing to subject themselves to the horror of Windows 8 ;))

sigmavirus24 avatar Sep 24 '13 02:09 sigmavirus24

@sigmavirus24 I have Windows 8. =) Strongly considering moving to Linux on that machine though. Anyway, off-topic.

It's worth noting that this is absolutely not reproducible on 32-bit Cygwin on Windows 7, which strongly points to a problem with Cygwin.

Lukasa avatar Sep 24 '13 08:09 Lukasa

@sigmavirus24 - here's the dump. Basically running python3 or python3.2 both yield stack dumps for python 3.2. And no, this isn't my personal box that I'm running Windows 8 on. :)

https://gist.github.com/mikewn/6688148

mikewn avatar Sep 24 '13 17:09 mikewn

Does the script, perchance, call a subprocess that uses the UUID module in Python? It turns out that the UUID module in Cygwin64 Python is currently segfaulting, which might be causing mysterious failures.

ahmadia avatar Oct 01 '13 18:10 ahmadia

The install script doesn't but urllib3 does use the uuid module for multipart/form-data. Since everything is "compiled" upon install if it tries to even import it then this could certainly be the issue. We could go back to the environment flag to prevent compilation of bytecode but we had our heads handed to us for that.

sigmavirus24 avatar Oct 01 '13 19:10 sigmavirus24