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

Always getting "Failed to download wheel for pip" on Windows #27

Closed
sschuberth opened this issue Jul 26, 2020 · 3 comments · Fixed by #30
Closed

Always getting "Failed to download wheel for pip" on Windows #27

sschuberth opened this issue Jul 26, 2020 · 3 comments · Fixed by #30

Comments

@sschuberth
Copy link

sschuberth commented Jul 26, 2020

On Windows 10 with Python 2.7.12 (and running from Git Bash) I'm always getting

$ pipgrip --tree pipgrip
Traceback (most recent call last):
  File "c:\python\lib\runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "c:\python\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "C:\Python27\Scripts\pipgrip.exe\__main__.py", line 9, in <module>
  File "c:\python\lib\site-packages\click\core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "c:\python\lib\site-packages\click\core.py", line 697, in main
    rv = self.invoke(ctx)
  File "c:\python\lib\site-packages\click\core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\python\lib\site-packages\click\core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "c:\python\lib\site-packages\pipgrip\cli.py", line 305, in main
    source.root_dep(root_dependency)
  File "c:\python\lib\site-packages\pipgrip\package_source.py", line 147, in root_dep
    self.discover_and_add(req.__str__())
  File "c:\python\lib\site-packages\pipgrip\package_source.py", line 126, in discover_and_add
    package, self.index_url, self.extra_index_url, self.cache_dir, self.pre
  File "c:\python\lib\site-packages\pipgrip\pipper.py", line 345, in discover_dependencies_and_versions
    req.__str__(), index_url, extra_index_url, pre, cache_dir
  File "c:\python\lib\site-packages\pipgrip\pipper.py", line 280, in _download_wheel
    raise RuntimeError("Failed to download wheel for {}".format(package))
RuntimeError: Failed to download wheel for pipgrip

I also tried with other Python packages, same thing. Any hint how to resolve that issue?

@ddelange
Copy link
Owner

Hi @sschuberth,

Thanks for reporting this. I need to include Mac and Windows (and different pip versions) in tests. Especially for Windows, I'm sure there will be many errors like this.

Most likely, the cause of this error lies in the fact that pip formats their output messages slightly differently depending on pip version, python version, OS version, and pipgrip relies on this output to get the filename of the wheel (as pip is a CLI tool and shouldn't be imported as Python library).

As I don't have a Windows VM at hand, you could help me speed up the process by adding the output of pipgrip -vvv pipgrip, and pip wheel pipgrip, from your specific environment.

@sschuberth
Copy link
Author

Sure:

$ pipgrip -vvv pipgrip
DEBUG: {'os_name': 'nt', 'python_version': '2.7', 'platform_system': 'Windows', 'platform_release': '10', 'implementation_version': '0', 'python_full_version': '2.7.12', 'implementation_name': '', 'platform_python_implementation': 'CPython', 'platform_machine': 'AMD64', 'sys_platform': 'win32', 'platform_version': '10.0.19041'}
DEBUG: Downloading/building wheel for pipgrip
DEBUG: ['c:\\python\\python.exe', '-m', 'pip', 'wheel', '--no-deps', '--disable-pip-version-check', '--wheel-dir', 'C:\\Users\\sebastian\\AppData\\Local\\pip\\Cache\\wheels\\pipgrip', '--index-url', u'https://pypi.org/simple', '--trusted-host', u'pypi.org', u'pipgrip']
Traceback (most recent call last):
  File "c:\python\lib\runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "c:\python\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "C:\Python27\Scripts\pipgrip.exe\__main__.py", line 9, in <module>
  File "c:\python\lib\site-packages\click\core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "c:\python\lib\site-packages\click\core.py", line 697, in main
    rv = self.invoke(ctx)
  File "c:\python\lib\site-packages\click\core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\python\lib\site-packages\click\core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "c:\python\lib\site-packages\pipgrip\cli.py", line 305, in main
    source.root_dep(root_dependency)
  File "c:\python\lib\site-packages\pipgrip\package_source.py", line 147, in root_dep
    self.discover_and_add(req.__str__())
  File "c:\python\lib\site-packages\pipgrip\package_source.py", line 126, in discover_and_add
    package, self.index_url, self.extra_index_url, self.cache_dir, self.pre
  File "c:\python\lib\site-packages\pipgrip\pipper.py", line 345, in discover_dependencies_and_versions
    req.__str__(), index_url, extra_index_url, pre, cache_dir
  File "c:\python\lib\site-packages\pipgrip\pipper.py", line 280, in _download_wheel
    raise RuntimeError("Failed to download wheel for {}".format(package))
RuntimeError: Failed to download wheel for pipgrip

And:

$ pip wheel pipgrip
Collecting pipgrip
  Using cached https://files.pythonhosted.org/packages/6b/09/756db7ae3dd2ec804963e21db8250ffe347aaba6f6d13d6c0ed833d85109/pipgrip-0.4.1-py2.py3-none-any.whl
  Saved c:\dev\oss-review-toolkit\pipgrip-0.4.1-py2.py3-none-any.whl
Collecting packaging>=17 (from pipgrip)
  Using cached https://files.pythonhosted.org/packages/46/19/c5ab91b1b05cfe63cccd5cfc971db9214c6dd6ced54e33c30d5af1d2bc43/packaging-20.4-py2.py3-none-any.whl
  Saved c:\dev\oss-review-toolkit\packaging-20.4-py2.py3-none-any.whl
Collecting anytree (from pipgrip)
  Using cached https://files.pythonhosted.org/packages/a8/65/be23d8c3ecd68d40541d49812cd94ed0f3ee37eb88669ca15df0e43daed1/anytree-2.8.0-py2.py3-none-any.whl
  Saved c:\dev\oss-review-toolkit\anytree-2.8.0-py2.py3-none-any.whl
Collecting typing; python_version == "2.7" (from pipgrip)
  Using cached https://files.pythonhosted.org/packages/3b/c0/e44213fcb799eac02881e2485724ba5b0914600bc9df6ed922e364fdc059/typing-3.7.4.3-py2-none-any.whl
  Saved c:\dev\oss-review-toolkit\typing-3.7.4.3-py2-none-any.whl
Collecting click (from pipgrip)
  Cache entry deserialization failed, entry ignored
  Downloading https://files.pythonhosted.org/packages/d2/3d/fa76db83bf75c4f8d338c2fd15c8d33fdd7ad23a9b5e57eb6c5de26b430e/click-7.1.2-py2.py3-none-any.whl (82kB)
  Saved c:\dev\oss-review-toolkit\click-7.1.2-py2.py3-none-any.whl
Collecting pkginfo>=1.4.2 (from pipgrip)
  Using cached https://files.pythonhosted.org/packages/e6/d5/451b913307b478c49eb29084916639dc53a88489b993530fed0a66bab8b9/pkginfo-1.5.0.1-py2.py3-none-any.whl
  Saved c:\dev\oss-review-toolkit\pkginfo-1.5.0.1-py2.py3-none-any.whl
Collecting pip>=7.1.0 (from pipgrip)
  Cache entry deserialization failed, entry ignored
  Using cached https://files.pythonhosted.org/packages/43/84/23ed6a1796480a6f1a2d38f2802901d078266bda38388954d01d3f2e821d/pip-20.1.1-py2.py3-none-any.whl
  Saved c:\dev\oss-review-toolkit\pip-20.1.1-py2.py3-none-any.whl
Collecting wheel (from pipgrip)
  Using cached https://files.pythonhosted.org/packages/8c/23/848298cccf8e40f5bbb59009b32848a4c38f4e7f3364297ab3c3e2e2cd14/wheel-0.34.2-py2.py3-none-any.whl
  Saved c:\dev\oss-review-toolkit\wheel-0.34.2-py2.py3-none-any.whl
Collecting setuptools>=38.3 (from pipgrip)
  Using cached https://files.pythonhosted.org/packages/e1/b7/182161210a13158cd3ccc41ee19aadef54496b74f2817cc147006ec932b4/setuptools-44.1.1-py2.py3-none-any.whl
  Saved c:\dev\oss-review-toolkit\setuptools-44.1.1-py2.py3-none-any.whl
Collecting enum34; python_version == "2.7" (from pipgrip)
  Using cached https://files.pythonhosted.org/packages/6f/2c/a9386903ece2ea85e9807e0e062174dc26fdce8b05f216d00491be29fad5/enum34-1.1.10-py2-none-any.whl
  Saved c:\dev\oss-review-toolkit\enum34-1.1.10-py2-none-any.whl
Collecting six (from packaging>=17->pipgrip)
  Downloading https://files.pythonhosted.org/packages/ee/ff/48bde5c0f013094d729fe4b0316ba2a24774b3ff1c52d924a8a4cb04078a/six-1.15.0-py2.py3-none-any.whl
  Saved c:\dev\oss-review-toolkit\six-1.15.0-py2.py3-none-any.whl
Collecting pyparsing>=2.0.2 (from packaging>=17->pipgrip)
  Using cached https://files.pythonhosted.org/packages/8a/bb/488841f56197b13700afd5658fc279a2025a39e22449b7cf29864669b15d/pyparsing-2.4.7-py2.py3-none-any.whl
  Saved c:\dev\oss-review-toolkit\pyparsing-2.4.7-py2.py3-none-any.whl
Skipping pipgrip, due to already being wheel.
Skipping packaging, due to already being wheel.
Skipping anytree, due to already being wheel.
Skipping typing, due to already being wheel.
Skipping click, due to already being wheel.
Skipping pkginfo, due to already being wheel.
Skipping pip, due to already being wheel.
Skipping wheel, due to already being wheel.
Skipping setuptools, due to already being wheel.
Skipping enum34, due to already being wheel.
Skipping six, due to already being wheel.
Skipping pyparsing, due to already being wheel.
You are using pip version 9.0.1, however version 20.1.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

@ddelange
Copy link
Owner

Released 0.4.2

@sschuberth sschuberth changed the title Always getting "Failed to download wheel for pip" Always getting "Failed to download wheel for pip" on Windows Jul 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants