Python – Import Error: No module named ‘utils’

fuzzywuzzyimporterrorpythonpython-3.xpython-import

Please excuse me I'm a newbie. I'm trying to use the fuzzywuzzy module from seatgeek. I am using Python 3

Initially, I was getting this error:

  from fuzzywuzzy import fuzz
ImportError: cannot import name fuzz

I changed the import statement to import fuzzywuzzy.fuzz and Now, I'm getting this error:

  File "test.py", line 4, in <module>
     import fuzzywuzzy.fuzz
  File "C:\Python33\lib\site-packages\fuzzywuzzy\fuzz.py", line 31, in <module>
     from utils import *
ImportError: No module named 'utils'

Best Answer

The fuzzywuzzy package is not Python 3 compatible, it'll only work on Python 2.

Specifically, the error is because the fuzz module uses relative imports, a technique removed from Python 3.

The repository issue tracker does have a Python 3 compatibility patch you could try out.