Giter VIP home page Giter VIP logo

Comments (8)

jadarve avatar jadarve commented on August 23, 2024

what is your cython version?

cython --version

from optical-flow-filter.

pranavpawar3 avatar pranavpawar3 commented on August 23, 2024

from optical-flow-filter.

jadarve avatar jadarve commented on August 23, 2024

I upgraded my machine to Cython 0.28.2 and now I'm having trouble compiling the Python wrappers. When I run ptyhon setup.py build I get get following error:

Traceback (most recent call last):
  File "setup.py", line 80, in <module>
    extList = cythonize(createExtension(mod[0], mod[1]), compiler_directives=cython_directives)
  File "/usr/local/lib/python2.7/dist-packages/Cython/Build/Dependencies.py", line 897, in cythonize
    aliases=aliases)
  File "/usr/local/lib/python2.7/dist-packages/Cython/Build/Dependencies.py", line 719, in create_extension_list
    elif isinstance(patterns, basestring) or not isinstance(patterns, collections.Iterable):
  File "/usr/lib/python2.7/abc.py", line 144, in __instancecheck__
    return cls.__subclasscheck__(subtype)
  File "/usr/lib/python2.7/abc.py", line 180, in __subclasscheck__
    if issubclass(subclass, scls):
  File "/usr/lib/python2.7/abc.py", line 180, in __subclasscheck__
    if issubclass(subclass, scls):
  File "/usr/lib/python2.7/abc.py", line 161, in __subclasscheck__
    ok = cls.__subclasshook__(subclass)
  File "/usr/local/lib/python2.7/dist-packages/backports_abc.py", line 66, in __subclasshook__
    mro = C.__mro__
AttributeError: class Extension has no attribute '__mro__'

I will check what's happening and fix it.

from optical-flow-filter.

pranavpawar3 avatar pranavpawar3 commented on August 23, 2024

from optical-flow-filter.

jadarve avatar jadarve commented on August 23, 2024

This is a problem with Cython 0.28.2. I tried downgrading to version 0.23.5 and the build process completes successfully. This is a known issue: cython/cython#1507

You can downgrade Cython as follows:

Uninstall current version:

sudo pip uninstall cython

or

sudo apt remove python-cython

depending on how you installed it.

Then you can install the proper version as follows

sudo pip install cython==0.23.5

from optical-flow-filter.

pranavpawar3 avatar pranavpawar3 commented on August 23, 2024

I downgraded Cython, but still it is showing the same error after sudo python setup.py install. Also the same warnings are coming after running command python setup.py build. One more thing, when i executed the command sudo pip uninstall cython it was showing following error;
sudo: pip: command not found
so that is why i used pip uninstall cython and thus it got uninstalled. Same happened for `sudo pip cython==0.23.5 and i fixed it in the same way.

from optical-flow-filter.

jadarve avatar jadarve commented on August 23, 2024

Could you confirm the new Cython version? From the comment above, you didn't have pip installed in your machine. As mentioned above, using Cython 0.23.5 works fine.

from optical-flow-filter.

pranavpawar3 avatar pranavpawar3 commented on August 23, 2024

Sorry for the late reply Jaden, but the issue is solved now, one of my senior solved it. Thanks for your time and help!!!

from optical-flow-filter.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.