pip._vendor.pep517.wrappers.BackendUnavailable error while installing cryptography
Asked Answered
H

2

7

I'm trying to install cryptography to my system, but I get this error:

  WARNING: Missing build requirements in pyproject.toml for cryptography from https://files.pythonhosted.org/packages/07/ca/bc827c5e55918ad223d59d299fff92f3563476c3b00d0a9157d9c0217449/cryptography-2.6.1.tar.gz#sha256=26c821cbeb683facb966045e2064303029d572a87ee69ca5a1bf54bf55f93ca6.
  WARNING: The project does not specify a build backend, and pip cannot fall back to setuptools without 'setuptools>=40.8.0' and 'wheel'.
  Getting requirements to build wheel ... done
ERROR: Exception:
Traceback (most recent call last):
  File "/data/packages/usr/local/lib/python3.6/site-packages/pip/_internal/cli/base_command.py", line 178, in main
    status = self.run(options, args)
  File "/data/packages/usr/local/lib/python3.6/site-packages/pip/_internal/commands/install.py", line 352, in run
    resolver.resolve(requirement_set)
  File "/data/packages/usr/local/lib/python3.6/site-packages/pip/_internal/resolve.py", line 131, in resolve
    self._resolve_one(requirement_set, req)
  File "/data/packages/usr/local/lib/python3.6/site-packages/pip/_internal/resolve.py", line 294, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "/data/packages/usr/local/lib/python3.6/site-packages/pip/_internal/resolve.py", line 242, in _get_abstract_dist_for
    self.require_hashes
  File "/data/packages/usr/local/lib/python3.6/site-packages/pip/_internal/operations/prepare.py", line 368, in prepare_linked_requirement
    abstract_dist.prep_for_dist(finder, self.build_isolation)
  File "/data/packages/usr/local/lib/python3.6/site-packages/pip/_internal/operations/prepare.py", line 175, in prep_for_dist
    self.install_backend_dependencies(finder=finder)
  File "/data/packages/usr/local/lib/python3.6/site-packages/pip/_internal/operations/prepare.py", line 123, in install_backend_dependencies
    reqs = req.pep517_backend.get_requires_for_build_wheel()
  File "/data/packages/usr/local/lib/python3.6/site-packages/pip/_vendor/pep517/wrappers.py", line 71, in get_requires_for_build_wheel
    'config_settings': config_settings
  File "/data/packages/usr/local/lib/python3.6/site-packages/pip/_vendor/pep517/wrappers.py", line 162, in _call_hook
    raise BackendUnavailable
pip._vendor.pep517.wrappers.BackendUnavailable

This is my setup:

  • Alpine Linux 3.6.2

  • Python 3.6.3

  • pip 19.1

  • wheel 0.33.1

  • setuptools 41.0.1

Any idea what could be the problem, or how to solve it? Thanks for the help in advance!

Hysterical answered 2/5, 2019 at 14:55 Comment(1)
Seems like pip install cryptography --no-use-pep517 solved the problemHysterical
C
4

I did not find any uniform solution to this problem. You can try the following troubleshooting steps. one of them should work.

  1. Upgrade the pip version.

  2. Change the library/package version.

  3. If you are installing from source, try a different .whl package or use tar.gz.

  4. Use --no-use-pep517 with your pip install command (didn't work for me though, but I see it worked for some).

Carolinecarolingian answered 6/12, 2022 at 21:47 Comment(1)
Option 1 worked for me (was using pip 19.2.3 and changed to version 23.2.1)Curkell
V
3

I got the same error with a different library and --no-use-pep517 did not help. However this did:

python -m pip install --upgrade pip
Veil answered 10/1, 2022 at 9:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.