pmneila / PyMCubes

Marching cubes (and related tools) for Python
BSD 3-Clause "New" or "Revised" License
692 stars 87 forks source link

build error #9

Closed bendichter closed 7 years ago

bendichter commented 7 years ago

Hi,

I get the following build error:

python setup.py build
Traceback (most recent call last):
  File "setup.py", line 52, in <module>
    ext_modules=cythonize(mcubes_module),
  File "/Users/bendichter/anaconda/envs/python2/lib/python2.7/site-packages/Cython/Build/Dependencies.py", line 818, in cythonize
    aliases=aliases)
  File "/Users/bendichter/anaconda/envs/python2/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/bendichter/anaconda/envs/python2/lib/python2.7/abc.py", line 144, in __instancecheck__
    return cls.__subclasscheck__(subtype)
  File "/Users/bendichter/anaconda/envs/python2/lib/python2.7/abc.py", line 180, in __subclasscheck__
    if issubclass(subclass, scls):
  File "/Users/bendichter/anaconda/envs/python2/lib/python2.7/abc.py", line 180, in __subclasscheck__
    if issubclass(subclass, scls):
  File "/Users/bendichter/anaconda/envs/python2/lib/python2.7/abc.py", line 161, in __subclasscheck__
    ok = cls.__subclasshook__(subclass)
  File "/Users/bendichter/anaconda/envs/python2/lib/python2.7/site-packages/backports_abc.py", line 66, in __subclasshook__
    mro = C.__mro__
AttributeError: class Extension has no attribute '__mro__'

OSX

python: Python 2.7.11 |Anaconda custom (x86_64)| (default, Dec 6 2015, 18:57:58)

gcc: Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/c++/4.2.1 Apple LLVM version 8.0.0 (clang-800.0.42.1) Target: x86_64-apple-darwin15.6.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

pmneila commented 7 years ago

This is a known (and fixed) bug in Cython. See cython/cython#1507 and cython/backports_abc#7. It seems you are using an old version of Cython. Can you update your Anaconda packages?

bendichter commented 7 years ago

Thanks for the response. Ill give that a shot

On May 4, 2017 11:44 AM, "pmneila" notifications@github.com wrote:

This is a known (and fixed) bug in Cython. See cython/cython#1507 https://github.com/cython/cython/issues/1507 and cython/backports_abc#7 https://github.com/cython/backports_abc/issues/7. It seems you are using an old version of Cython. Can you update your Anaconda packages?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pmneila/PyMCubes/issues/9#issuecomment-299274328, or mute the thread https://github.com/notifications/unsubscribe-auth/AAziEisQ1aIxXs7z6eJEzDSXfuZw-wjFks5r2hyKgaJpZM4NQ9-k .

bendichter commented 7 years ago

I made a fresh conda venv with numpy 1.12.1, Cython 0.25.2, backports-abc-0.5, and python 2.7. Still no dice... I realize this is a problem with cython/backports-abc, so feel free to close.

bendichter commented 7 years ago

I got it working. In case anyone else runs into the same error, here's what I think happened: I am using a venv and I was importing numpy in my ipython_config file. I think it was importing the wrong numpy. When I removed that line the import worked as expected. Thanks for the help, @pmneila!