dedupeio / dedupe-examples

:id: Examples for using the dedupe library
MIT License
406 stars 214 forks source link

ImportError: cannot import name ABC #104

Closed vnguyendc closed 4 years ago

vnguyendc commented 4 years ago

when i run $python csv_example.py I get this error:

Traceback (most recent call last):
  File "csv_example.py", line 26, in <module>
    import dedupe
  File "/anaconda3/envs/entity-resolution/lib/python2.7/site-packages/dedupe/__init__.py", line 6, in <module>
    from dedupe._init import *  # noqa
  File "/anaconda3/envs/entity-resolution/lib/python2.7/site-packages/dedupe/_init.py", line 1, in <module>
    from dedupe.api import StaticDedupe, Dedupe  # noqa: F401
  File "/anaconda3/envs/entity-resolution/lib/python2.7/site-packages/dedupe/api.py", line 24, in <module>
    import dedupe.datamodel as datamodel
  File "/anaconda3/envs/entity-resolution/lib/python2.7/site-packages/dedupe/datamodel.py", line 8, in <module>
    import dedupe.variables.base as base
  File "/anaconda3/envs/entity-resolution/lib/python2.7/site-packages/dedupe/variables/base.py", line 1, in <module>
    from dedupe import predicates
  File "/anaconda3/envs/entity-resolution/lib/python2.7/site-packages/dedupe/predicates.py", line 11, in <module>
    import dedupe.tfidf as tfidf
  File "/anaconda3/envs/entity-resolution/lib/python2.7/site-packages/dedupe/tfidf.py", line 6, in <module>
    from .index import Index
  File "/anaconda3/envs/entity-resolution/lib/python2.7/site-packages/dedupe/index.py", line 1, in <module>
    from abc import ABC, abstractmethod
ImportError: cannot import name ABC
ahsanjaved67 commented 4 years ago

Try to change the name of the file or column which is abc. BR

On Thu, Feb 6, 2020, 12:21 AM Vinh Nguyen notifications@github.com wrote:

when i run $python csv_example.py I get this error:

Traceback (most recent call last): File "csv_example.py", line 26, in import dedupe File "/anaconda3/envs/entity-resolution/lib/python2.7/site-packages/dedupe/init.py", line 6, in from dedupe._init import * # noqa File "/anaconda3/envs/entity-resolution/lib/python2.7/site-packages/dedupe/_init.py", line 1, in from dedupe.api import StaticDedupe, Dedupe # noqa: F401 File "/anaconda3/envs/entity-resolution/lib/python2.7/site-packages/dedupe/api.py", line 24, in import dedupe.datamodel as datamodel File "/anaconda3/envs/entity-resolution/lib/python2.7/site-packages/dedupe/datamodel.py", line 8, in import dedupe.variables.base as base File "/anaconda3/envs/entity-resolution/lib/python2.7/site-packages/dedupe/variables/base.py", line 1, in from dedupe import predicates File "/anaconda3/envs/entity-resolution/lib/python2.7/site-packages/dedupe/predicates.py", line 11, in import dedupe.tfidf as tfidf File "/anaconda3/envs/entity-resolution/lib/python2.7/site-packages/dedupe/tfidf.py", line 6, in from .index import Index File "/anaconda3/envs/entity-resolution/lib/python2.7/site-packages/dedupe/index.py", line 1, in from abc import ABC, abstractmethod ImportError: cannot import name ABC

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dedupeio/dedupe-examples/issues/104?email_source=notifications&email_token=AJJ6MOVRMBFXQA2AV6ORWJLRBMUVBA5CNFSM4KQSIDHKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4ILKT5XA, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJJ6MOVJBYJQMQPBBB4CKWTRBMUVBANCNFSM4KQSIDHA .

fgregg commented 4 years ago

newer versions of dedupe are python 3 only