导入 allennlp 时出现此错误,
from allennlp.common.util import sanitize
ModuleNotFoundError: No module named 'allennlp.common'
(venv-kbs) administrator@NLR:~/aman/Project$ python
Python 3.6.3 (default, Oct 6 2017, 00:00:00)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import allennlp
>>> from allennlp.common.util import sanitize
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'allennlp.common'
我的 allennlp 版本是 0.2.1,甚至尝试更新到 0.4.1 也会出现同样的错误。
TIA