Rumah > Soal Jawab > teks badan
__init__.py
中:
from gensim import utils, matutils, interfaces, corpora, models, similarities
utils.py在同一级目录,为什么还提示‘ImportError: cannot import name utils’
迷茫2017-04-17 15:04:34
不清楚具体细节,试下把__init__.py
里的内容
from gensim import utils, matutils, interfaces, corpora, models, similarities
替换成
from . import utils, matutils, interfaces, corpora, models, similarities