python - ImportError: cannot import name utils
PHPz
PHPz 2017-04-17 15:02:34
0
1
1135

__init__.py中:

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

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

PHPz
PHPz

学习是最好的投资!

Antworte allen(1)
迷茫

不清楚具体细节,试下把__init__.py里的内容

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

替换成

from . import utils, matutils, interfaces, corpora, models, similarities
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage