Install & Compatibility
Where this runs
tested against v3.0.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
py 3.10
✕ build_error
✓ 12.5s
py 3.11
✕ build_error
✕ build_error
py 3.12
✕ build_error
✕ build_error
py 3.13
✕ build_error
✕ build_error
py 3.9
✕ build_error
✓ 13.5s
299MB installed
● package 299MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Dedupe
✓ import dedupe
✗ from dedupe import Dedupe
The main class is not directly exported; use dedupe.Dedupe after importing the module.
Basic dedupe workflow: load data, define fields, sample, train, and cluster duplicates.
import dedupe
import csv
data_d = {}
with open('input.csv') as f:
reader = csv.DictReader(f)
for i, row in enumerate(reader):
data_d[i] = row
# Initialize deduper
deduper = dedupe.Dedupe([{'field': 'name', 'type': 'String'},
{'field': 'address', 'type': 'String'}])
# Training (sample)
deduper.sample(data_d, 10000)
# For labeled examples, use deduper.markPairs or load from file
deduper.train()
# Cluster
clustered = deduper.cluster(data_d)
print(clustered)
Debug
Known issues
breakingIn dedupe v2, the API changed significantly: 'Dedupe' class replaced old Dedupe function, and training/sampling methods were reworked.fixUpdate imports and method calls to match current API; refer to migration guide.
affects: old v1.x code will not work with v2+
gotchaThe 'Dedupe' class and related functions are not imported as submodules; always use 'import dedupe' then access e.g. dedupe.Dedupe.fixUse 'import dedupe' instead of 'from dedupe import Dedupe'.
affects: all
deprecatedThe 'ConsoleLabel' training method is deprecated in favor of programmatic labeling via 'markPairs'.fixUse deduper.markPairs or provide pre-labeled data.
affects: >=3.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'dedupe'
Library not installed or installed in a different environment.
fixRun 'pip install dedupe' and ensure the correct Python environment is activated.
AttributeError: module 'dedupe' has no attribute 'Dedupe'
Incorrect import pattern (e.g., 'from dedupe import Dedupe') or using an older version.
fixUse 'import dedupe' then access 'dedupe.Dedupe'.
TypeError: 'str' object cannot be interpreted as an integer
Passing string keys to data_d but dedupe expects integer keys.
fixEnsure dictionary keys are integers (e.g., use enumerate).
Upgrade
Version history
3.0.3latest on PyPI · released Aug 15, 2024
Audit
Dependencies
No dependency data recorded yet.