cari

Rumah  >  Soal Jawab  >  teks badan

python - ImportError: cannot import name utils

__init__.py中:

from gensim import utils, matutils, interfaces, corpora, models, similarities

utils.py在同一级目录,为什么还提示‘ImportError: cannot import name utils

PHPzPHPz2805 hari yang lalu1132

membalas semua(1)saya akan balas

  • 迷茫

    迷茫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
    

    balas
    0
  • Batalbalas