contextual-repr-analysis
contextual-repr-analysis copied to clipboard
While Testing: ImportError: No module named 'allennlp'
Hi, and also I think your paper is awesome! Anyway, onto the issue:
I'm following your 'getting started' guide, and while running py.test -v
I get this error for every single task (I'm just showing the error for word_conditional_conllu_pos_tagging_test.py
:
_______ ERROR collecting tests/models/word_conditional_majority_tagger/word_conditional_conllu_pos_tagging_test.py _______
ImportError while importing test module '/home/atreyee/contextual-repr-analysis/tests/models/word_conditional_majority_tagger/word_conditional_conllu_pos_tagging_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/models/word_conditional_majority_tagger/word_conditional_conllu_pos_tagging_test.py:3: in <module>
from contexteval.common.model_test_case import ModelTestCase
contexteval/__init__.py:1: in <module>
from contexteval.contextualizers import * # noqa: F401,F403
contexteval/contextualizers/__init__.py:1: in <module>
from contexteval.contextualizers.contextualizer import Contextualizer
contexteval/contextualizers/contextualizer.py:4: in <module>
from allennlp.common.registrable import Registrable
E ImportError: No module named 'allennlp'
The test is run within a conda environment, set up as you recommended, with one minor difference: I used the https://
link instead of the git://
link for cloning allennlp, because I can't access git links on my network.
Nonetheless, allennlp
is installed and can be accessed by the code- I tested this by test-printing Registrable
from within the above contextualizer.py
module, and it successfully prints <class 'allennlp.common.registrable.Registrable'>
. So clearly the code can access the module, but while running tests, it can't...?
Hi, sorry for totally missing this---I'll get back to you about this.
Any progress on this issue?
what version of python are you using? I wasn't able to reproduce this issue, unfortunately :(
what version of python are you using? I wasn't able to reproduce this issue, unfortunately :(
I will open a new issue about this.