我是 python 新手,我正在尝试在我的代码中导入 polyglot 模块。我已经安装了Polyglot 安装中解释的 polyglot ,一切都很顺利,但它仍然给我同样的错误。
ModuleNotFoundError: No module named 'polyglot.text'; 'polyglot' is not a package
当我在驱动器中检查 polyglot 时,它已安装在目录中
D:\Anaconda\Lib\site-packages\polyglot-16.7.4-py3.7.egg\polyglot
它在我的代码中具有所有需要的功能。我需要知道问题出在哪里?我需要解决它!
我需要导入以下函数:
from polyglot.transliteration import Transliterator
from polyglot.mapping import Embedding
from polyglot.load import load_embeddings