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

No module named '_cffi_backend' error #4403

Closed
akshaybabloo opened this issue Aug 15, 2018 · 5 comments
Closed

No module named '_cffi_backend' error #4403

akshaybabloo opened this issue Aug 15, 2018 · 5 comments

Comments

@akshaybabloo
Copy link

For some reason I am getting the following error:

Traceback (most recent call last):
  File "C:/Users/aksha/Documents/GitHub/neucube-cloud-api/temp.py", line 2, in <module>
    from azure.keyvault import KeyVaultClient, KeyVaultAuthentication
  File "C:\Users\aksha\Miniconda3\envs\neucube\lib\site-packages\azure\keyvault\__init__.py", line 15, in <module>
    from .key_vault_authentication import KeyVaultAuthentication, KeyVaultAuthBase, AccessToken
  File "C:\Users\aksha\Miniconda3\envs\neucube\lib\site-packages\azure\keyvault\key_vault_authentication.py", line 13, in <module>
    from azure.keyvault.http_message_security import HttpMessageSecurity
  File "C:\Users\aksha\Miniconda3\envs\neucube\lib\site-packages\azure\keyvault\http_message_security.py", line 9, in <module>
    from ._internal import _a128cbc_hs256_encrypt, _a128cbc_hs256_decrypt, _JwsHeader, _JwsObject, \
  File "C:\Users\aksha\Miniconda3\envs\neucube\lib\site-packages\azure\keyvault\_internal.py", line 16, in <module>
    from cryptography.hazmat.primitives import hashes, constant_time, padding, hmac
  File "C:\Users\aksha\Miniconda3\envs\neucube\lib\site-packages\cryptography\hazmat\primitives\constant_time.py", line 11, in <module>
    from cryptography.hazmat.bindings._constant_time import lib
ModuleNotFoundError: No module named '_cffi_backend'

This never happened, I am not sure what the problem is.

Versions

Python: 3.7
cryptography: 2.3.1
ciffi: 1.11.5
pip: 10.0.1
setuptools: 40.0.0

@reaperhulk
Copy link
Member

This error typically occurs when something is wrong with your installation of cffi or it can't find it in the sys.path. I have no idea how anaconda/miniconda manage this, but you might try seeing if the problem exists if you install everything into a new virtualenv.

@akshaybabloo
Copy link
Author

True. My bad. Seems to be a problem when upgrading python 3.6 to 3.7.

@orihomie
Copy link

orihomie commented Apr 3, 2019

True. My bad. Seems to be a problem when upgrading python 3.6 to 3.7.

So, how did u resolved this problem?

@akshaybabloo
Copy link
Author

Downgrade to 3.6 for now. Till they add support for 3.7

@reaperhulk
Copy link
Member

We support Python 3.7 (and indeed test against it in numerous configurations on 3 different OSes). This issue is not caused by a bug in cryptography or cffi and is almost always a problem with the environment on the user's machine. For instance, keeping the same packages while upgrading from 3.6 to 3.7 would break cffi (and any other C package that depends on version specific interfaces). You need to install cffi again with a 3.7 compatible version (which can be accomplished with pip install -U cffi).

@pyca pyca locked and limited conversation to collaborators Apr 6, 2019
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

3 participants