ImportError: cannot import name decorate

python tutorials/get_started.py

Traceback (most recent call last):

File "tutorials/get_started.py", line 13, in <module>

import tvm

File "/home/wangyushun/tvm/python/tvm/__init__.py", line 18, in <module>

from . import target

File "/home/wangyushun/tvm/python/tvm/target.py", line 54, in <module>

raise err_msg

ImportError: cannot import name decorate

Can you check if this is just due to a missing dependency?

I’m sorry I don’t understand, I follow official install tutorial, and get this error when executing tutorials/get_start.py

please pip install decorator

Yes, I did it already.

Your decorator version is too old. Can you upgrade it and try again?

pip install -U decorator

I tried and the result is the same…

I solved this issue, I should use sudo python tutorial/get_start.py to execute

That sounds like the wrong version of python is being invoked without sudo for some reason. You should not need root privileges to run the tutorial script.