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

Uknown hazmat backend issue on Ubuntu 12.04 LTS #2853

Closed
orion-napofearth opened this issue Mar 26, 2016 · 6 comments
Closed

Uknown hazmat backend issue on Ubuntu 12.04 LTS #2853

orion-napofearth opened this issue Mar 26, 2016 · 6 comments

Comments

@orion-napofearth
Copy link

I'm getting an error when running a very simple test of Fernet on Ubuntu 12.04 LTS after upgrading from cryptography 0.9 to 1.3.1.

Using the sample code found at https://cryptography.io/en/latest/fernet/ I get:

(virtualenv)root@web-dev# python
Python 2.7.3 (default, Dec 18 2014, 19:10:20) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from cryptography.fernet import Fernet
>>> key = Fernet.generate_key()
>>> f = Fernet(key)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/mediagraph/src/web/build/virtualenv/local/lib/python2.7/site-packages/cryptography-1.3.1-py2.7-linux-x86_64.egg/cryptography/fernet.py", line 32, in __init__
    backend = default_backend()
  File "/opt/mediagraph/src/web/build/virtualenv/local/lib/python2.7/site-packages/cryptography-1.3.1-py2.7-linux-x86_64.egg/cryptography/hazmat/backends/__init__.py", line 35, in default_backend
    _default_backend = MultiBackend(_available_backends())
  File "/opt/mediagraph/src/web/build/virtualenv/local/lib/python2.7/site-packages/cryptography-1.3.1-py2.7-linux-x86_64.egg/cryptography/hazmat/backends/__init__.py", line 22, in _available_backends
    "cryptography.backends"
AttributeError: 'EntryPoint' object has no attribute 'resolve'
>>> 

The cryptography egg is built from source on pypi. Any thoughts on what might be going wrong here? Much appreciated.

@alex
Copy link
Member

alex commented Mar 26, 2016

How did you install cryptography? This error is caused by using an old version of setuptools. pip install cryptography will install a new version of setuptools.

@orion-napofearth
Copy link
Author

Thanks @alex for the quick response! An old version of setuptools might indeed be the issue. It looks like I have something that is fairly old

python -m easy_install --version
distribute 0.6.24

Is this dependency something that changed between cryptography 0.9 and 1.3.1?

@alex
Copy link
Member

alex commented Mar 26, 2016

Yes, it did. It started with cryptography 1.3:
30e199e

On Fri, Mar 25, 2016 at 8:08 PM, Orion Reblitz-Richardson <
notifications@github.com> wrote:

Thanks @alex https://github.com/alex for the quick response! An old
version of setuptools might indeed be the issue. It looks like I have
something that is fairly old

python -m easy_install --version
distribute 0.6.24

Is this dependency something that changed between cryptography 0.9 and
1.3.1?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#2853 (comment)

"I disapprove of what you say, but I will defend to the death your right to
say it." -- Evelyn Beatrice Hall (summarizing Voltaire)
"The people's good is the highest law." -- Cicero
GPG Key fingerprint: D1B3 ADC0 E023 8CA6

@orion-napofearth
Copy link
Author

I verified that after running pip install --upgrade distribute the test does pass. Unfortunately we do our own python packaging, so I'll need to determine how to exactly get that dependency in. Thank you for your help, though! That was incredibly helpful.

@ik-grit
Copy link

ik-grit commented Jun 17, 2016

setuptools appears to be the cause of the issue. this worked for me

wget https://bootstrap.pypa.io/ez_setup.py -O - | sudo python

@fusco
Copy link

fusco commented Jun 22, 2016

thanks @ik-grit , it works like a charm !

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

4 participants