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: class Extension has no attribute '__mro__' #19

Open
vivekvenkris opened this issue Sep 22, 2017 · 3 comments
Open

AttributeError: class Extension has no attribute '__mro__' #19

vivekvenkris opened this issue Sep 22, 2017 · 3 comments

Comments

@vivekvenkris
Copy link

Hey Michele,

I am trying to install libstempo but get different errors on different platforms. This is the OSX error that I get:

WARNING: The libstempo API has changed substantially (for the better) from
versions 1.X to 2.X. If you need the older 1.X API, you can get an older libstempo
from https://pypi.python.org/simple/libstempo, or checkout the libstempo1
branch on GitHub - https://github.com/vallis/libstempo/tree/libstempo1
Found tempo2 install in [u'/Users/vkrishnan/T2runtime/'], will use it.
Traceback (most recent call last):
File "setup.py", line 109, in
extra_link_args = linkArgs))
File "/Users/vkrishnan/anaconda/lib/python2.7/site-packages/Cython/Build/Dependencies.py", line 818, in cythonize
aliases=aliases)
File "/Users/vkrishnan/anaconda/lib/python2.7/site-packages/Cython/Build/Dependencies.py", line 648, in create_extension_list
elif isinstance(patterns, basestring) or not isinstance(patterns, collections.Iterable):
File "/Users/vkrishnan/anaconda/lib/python2.7/abc.py", line 144, in instancecheck
return cls.subclasscheck(subtype)
File "/Users/vkrishnan/anaconda/lib/python2.7/abc.py", line 180, in subclasscheck
if issubclass(subclass, scls):
File "/Users/vkrishnan/anaconda/lib/python2.7/abc.py", line 180, in subclasscheck
if issubclass(subclass, scls):
File "/Users/vkrishnan/anaconda/lib/python2.7/abc.py", line 161, in subclasscheck
ok = cls.subclasshook(subclass)
File "/Users/vkrishnan/anaconda/lib/python2.7/site-packages/backports_abc.py", line 66, in subclasshook
mro = C.mro
AttributeError: class Extension has no attribute 'mro'

I tried pip install and setup.puy but both give the same error. Can you please tell me how to fix it?

My softwares:
conda 4.3.25
Python 2.7.11 :: Anaconda custom (x86_64)
OSX El Capitan 10.11.6
gcc (GCC) 4.9.2 20141029
g++ (GCC) 4.9.2 20141029
Tempo2 2017.03.1

Thanks,
Vivek

@vivekvenkris
Copy link
Author

Some googling suggested it is a conflict with cython and setuptools which should have been resolved in the versions I am using but doesn't seem like it.

My versions:
setuptools: 36.4.0-py27_1
cython: 0.26-py27_0

@vivekvenkris
Copy link
Author

Okay, Changing

backports_abc: 0.4-py27_0 --> 0.5-py27_0
tornado: 4.3-py27_0 --> 4.5.2-py27_0

seems to have done the trick. Sorry for posting the issue too soon! May be this will help others at some point. Please close this issue.

Vivek

@jellis18
Copy link
Collaborator

@vivekvenkris, I actually just had this problem as well and moving to Cython 0.25 from Cython 0.26 worked as well. Maybe this was done internally when you downgraded tornado?

Either, way @vallis and I should make take a look at this so it will fork for newer Cython versions.

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

No branches or pull requests

2 participants