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

cffi is missing when cryptography is installed using poetry #7467

Closed
dimaqq opened this issue Aug 2, 2022 · 2 comments
Closed

cffi is missing when cryptography is installed using poetry #7467

dimaqq opened this issue Aug 2, 2022 · 2 comments

Comments

@dimaqq
Copy link

dimaqq commented Aug 2, 2022

Possible upstream: python-poetry/poetry#6102

python -c 'from cryptography.hazmat.primitives.ciphers.aead import AESGCM'

Fails with:

    from cryptography.hazmat.backends.openssl import aead
  File ...
    from cryptography.hazmat.backends.openssl.backend import backend
  File ...
    from cryptography.hazmat.bindings.openssl import binding
  File ...
    from cryptography.hazmat.bindings._openssl import ffi, lib
ModuleNotFoundError: No module named '_cffi_backend'

When cryptography is a dep in a poetry project. cffi is missing.

If cryptography is installed using pip, then cffi is installed, and the code above works.

@reaperhulk
Copy link
Member

This issue, if it exists, is unlikely to be a cryptography issue, but rather a poetry one. That said, it also appears from the linked issue that upstream needs details as they are unable to reproduce.

@dimaqq
Copy link
Author

dimaqq commented Aug 3, 2022

You are correct, it was the manifestation of python-poetry/poetry#5970

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants