{"id":1487,"library":"fuzzywuzzy","title":"FuzzyWuzzy","description":"FuzzyWuzzy is a Python library that implements fuzzy string matching, often used for comparing the similarity between two strings. It leverages Levenshtein distance to calculate ratios between strings. The current version is 0.18.0. Its release cadence has been infrequent in recent years.","status":"active","version":"0.18.0","language":"python","source_language":"en","source_url":"https://github.com/seatgeek/fuzzywuzzy","tags":["string matching","fuzzy logic","levenshtein distance","nlp"],"install":[{"cmd":"pip install fuzzywuzzy","lang":"bash","label":"Basic Installation"},{"cmd":"pip install fuzzywuzzy[speedup]","lang":"bash","label":"With C++ Speedup (python-levenshtein)"}],"dependencies":[{"reason":"Provides a C++ implementation of Levenshtein distance for significant speed improvements, especially on large datasets.","package":"python-levenshtein","optional":true}],"imports":[{"symbol":"fuzz","correct":"from fuzzywuzzy import fuzz"},{"note":"The 'process' module, containing functions like extract, is a top-level import, not nested under 'fuzz'.","wrong":"from fuzzywuzzy.fuzz import process","symbol":"process","correct":"from fuzzywuzzy import process"}],"quickstart":{"code":"from fuzzywuzzy import fuzz\nfrom fuzzywuzzy import process\n\n# Simple Ratio\nprint(fuzz.ratio(\"this is a test\", \"this is a test!\"))\n\n# Partial Ratio\nprint(fuzz.partial_ratio(\"this is a test\", \"this is a test!\"))\n\n# Token Sort Ratio\nprint(fuzz.token_sort_ratio(\"fuzzy wuzzy was a bear\", \"wuzzy fuzzy was a bear\"))\n\n# Token Set Ratio\nprint(fuzz.token_set_ratio(\"fuzzy wuzzy was a bear\", \"wuzzy fuzzy was a bear\"))\n\nchoices = [\"apple jack\", \"apple mac\", \"apple sauce\", \"orange juice\"]\nprint(process.extract(\"apple\", choices, scorer=fuzz.ratio))\nprint(process.extractOne(\"apple goop\", choices))","lang":"python","description":"Demonstrates basic usage of `fuzz` for various ratio calculations and `process` for extracting best matches from a list of choices."},"warnings":[{"fix":"Install with `pip install fuzzywuzzy[speedup]` to include the C++ optimized `python-levenshtein` library.","message":"Without the optional `python-levenshtein` dependency, FuzzyWuzzy can be very slow for large datasets or frequent comparisons. The pure Python implementation is significantly less performant.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Be aware of the `processor` argument in functions like `process.extract` and consider implementing custom preprocessing if the default behavior is not suitable. For `fuzz` functions, you might need to preprocess strings yourself before passing them.","message":"FuzzyWuzzy's default string preprocessing (e.g., lowercasing, removing non-alphanumeric characters, and stripping whitespace) can sometimes lead to unexpected results if you need to preserve specific case or punctuation for your matching logic.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Consider alternatives like 'thefuzz' (a maintained fork) or 'rapidfuzz' for actively developed and often more performant solutions if long-term support or advanced features are critical.","message":"The library appears to be in a low-maintenance state, with the last release (0.18.0) in 2017. While functional, active development and new features are unlikely.","severity":"deprecated","affected_versions":"Since 0.18.0"},{"fix":"Always check that the list of choices passed to `process` functions is not empty before making the call.","message":"When using `process.extract` or `process.extractOne`, ensure your `choices` list is not empty, as this can lead to errors or unexpected behavior depending on the FuzzyWuzzy version and specific call.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"search_vec":"'0.18.0':34 'cadenc':37 'calcul':26 'compar':15 'current':31 'distanc':24,49 'fuzzi':9,46 'fuzzywuzzi':1,2 'implement':8 'infrequ':40 'levenshtein':23,48 'leverag':22 'librari':6 'logic':47 'match':11,45 'nlp':50 'often':12 'python':5 'ratio':27 'recent':42 'releas':36 'similar':17 'string':10,20,29,44 'two':19 'use':13 'version':32 'year':43","created_at":"2026-04-09T03:50:02.954877+00:00","updated_at":"2026-04-17T15:14:40.072599+00:00","problems":[{"fix":"Ensure fuzzywuzzy is installed in your active Python environment using pip: `pip install fuzzywuzzy` or `pip3 install fuzzywuzzy`. If using Anaconda, try `conda install -c conda-forge fuzzywuzzy` or ensure your Python version is compatible (e.g., use Python 3.8 if experiencing issues with 3.9.4).","cause":"The fuzzywuzzy library is not installed in the Python environment being used, or there's an incompatibility with the Python version (e.g., Python 3.9.4 with older fuzzywuzzy versions).","error":"ModuleNotFoundError: No module named 'fuzzywuzzy'"},{"fix":"Instead of `import fuzzywuzzy` and then `fuzzywuzzy.fuzz.ratio()`, use `from fuzzywuzzy import fuzz` and then `fuzz.ratio()`.","cause":"The `fuzz` submodule, which contains functions like `ratio` and `partial_ratio`, needs to be explicitly imported from the `fuzzywuzzy` package.","error":"AttributeError: module 'fuzzywuzzy' has no attribute 'fuzz'"},{"fix":"Instead of `import fuzzywuzzy` and then `fuzzywuzzy.process.extractOne()`, use `from fuzzywuzzy import process` and then `process.extractOne()`.","cause":"Similar to the `fuzz` submodule, the `process` submodule, which contains functions like `extract` and `extractOne`, must be explicitly imported.","error":"AttributeError: module 'fuzzywuzzy' has no attribute 'process'"},{"fix":"Install the `python-Levenshtein` library to enable the faster C implementation: `pip install python-Levenshtein`. On Windows, you might also need to install the Microsoft Visual C++ Redistributable 2015-2022 (x64).","cause":"The optional `python-Levenshtein` library, which provides a significant speedup for fuzzywuzzy, is not installed or not correctly recognized by fuzzywuzzy. This often happens if Microsoft Visual C++ Redistributable is missing on Windows.","error":"UserWarning: Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning."},{"fix":"pip install python-Levenshtein","cause":"'fuzzywuzzy' can use the 'python-Levenshtein' package for significantly faster string matching, but it is an optional dependency and was not found.","error":"UserWarning: The 'python-Levenshtein' package is not installed, internal Levenshtein implementation will be used which is slower."}],"ecosystem":"pypi","meta_description":null,"install_score":100,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.18.0","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/seatgeek/fuzzywuzzy","docs":null,"changelog":null,"pypi":"https://pypi.org/project/fuzzywuzzy/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["data"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-08-27","next_check":"2026-07-28","install_tag":"verified"}}