Error in importing relay



I’m trying to play around with relay, but I get the following error:

Python 3.6.6 (default, Jun 27 2018, 05:47:41) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tvm
>>> from tvm import relay
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/src/other/tvm/python/tvm/relay/", line 11, in <module>
    from .build_module import build, build_config, create_executor, optimize
  File "/usr/src/other/tvm/python/tvm/relay/", line 14, in <module>
    from .backend import graph_runtime_codegen as _graph_gen
  File "/usr/src/other/tvm/python/tvm/relay/backend/", line 24, in <module>
    import attr
ModuleNotFoundError: No module named 'attr'

This is using the current master (3a75b13d663a3bb14e11f5b7fd91980163f9dd75).

Any help would be appreciated.



try installing attrs python package
pip3 install attrs


Maybe also try running

python install --user under tvm/python.

I remember it scans the dependencies and would download attr package.