Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Import Error: No module named 'utils'

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'
like image 982
shoi Avatar asked Dec 07 '25 08:12

shoi


1 Answers

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.

like image 128
Martijn Pieters Avatar answered Dec 08 '25 22:12

Martijn Pieters