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

AttributeError: 'NoneType' object has no attribute 'EC_GROUP_new_by_curve_name' #11

Closed
seblau opened this issue Nov 13, 2016 · 5 comments

Comments

@seblau
Copy link

seblau commented Nov 13, 2016

He,

just installed petlib and now trying to create a new EcGroup instance the following exception occurs.
Any recommendations to make it work?

Python 2.7.10 (default, Oct 23 2015, 19:19:21) 
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import petlib
>>> from petlib.ec import EcGroup
Support not loading the library to build docs without compiling.
>>> G = EcGroup()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/sebastian/Developer/.envs/pet/lib/python2.7/site-packages/petlib/ec.py", line 62, in __init__
    self.ecg = _C.EC_GROUP_new_by_curve_name(nid)
AttributeError: 'NoneType' object has no attribute 'EC_GROUP_new_by_curve_name'
@gdanezis
Copy link
Owner

Hello -- given the error I suspect that the C library binding petlib to openssl did not build correctly. To be honest OSX is not a platform I have tested the build against. However, my students do use petlib with OSX homebrew so I will ask them to write a proper installation recipe.

@seblau
Copy link
Author

seblau commented Nov 13, 2016

Ok, that sounds legit. I had to use some global flags for the compiler in order to find the openssl headers on OSX.

pip install --global-option=build_ext --global-option="-I/usr/local/opt/openssl/include" petlib

I also tried to use homebrew openssl, but without success. An installation recipe for OSX would be great!

Regards, Sebastian

@gdanezis
Copy link
Owner

I now received a contribution from Panos Louridas, patching building for OSX. Would you like to try again installing petlib from the repository?

@seblau
Copy link
Author

seblau commented Jan 19, 2017

Works for me now! OSX 10.11.6

@gdanezis
Copy link
Owner

Awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants