[英]Import Error: No module named 'utils'
Please excuse me I'm a newbie. 请原谅我是新手。 I'm trying to use the fuzzywuzzy module from seatgeek.
我正在尝试使用seatgeek中的fuzzywuzzy模块。 I am using Python 3
我正在使用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: 我更改了import语句以导入fuzzywuzzy.fuzz,现在,我收到了这个错误:
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'
The fuzzywuzzy
package is not Python 3 compatible, it'll only work on Python 2. fuzzywuzzy
包不兼容Python 3,它只适用于Python 2。
Specifically, the error is because the fuzz
module uses relative imports, a technique removed from Python 3. 具体来说,错误是因为
fuzz
模块使用相对导入,这是从Python 3中删除的一种技术。
The repository issue tracker does have a Python 3 compatibility patch you could try out. 存储库问题跟踪器确实有一个可以尝试的Python 3兼容性补丁 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.