I’m trying to enable ANTLR so I can use the tvm.relay.fromtext()
function.
I followed the steps to install from source. I am running in an Ubuntu 16.04 Docker container. My Python version is 3.6.
I also ran the scripts to install the ANTLR dependencies that I found here, set USE_ANTLR
to ON
in build/config.cmake
, and rebuilt with cd build && cmake .. && make -j4
. However, when I try to run relay.fromtext(), I am still getting the following error:
...
File "/workspace/python/tvm/relay/_parser.py", line 55, in <module>
raise ParseError("Couldn't find ANTLR parser. Try building with USE_ANTLR=ON.")
ModuleNotFoundError: No module named 'antlr4'
During handling of the above exception, another exception occurred:
tvm.relay._parser.ParseError
How can I enable ANTLR?
Edit: I have also tried running in the tvmai/ci-cpu Docker container (image ID b845517dd3f9). The same function call gives me this error in the container.
...
File "/workspace/python/tvm/relay/_parser.py", line 86, in <module>
Scope = Deque[Tuple[str, T]]
NameError: name 'Deque' is not defined