# Error while running autotvm demo

**URL:** <https://discuss.tvm.apache.org/t/error-while-running-autotvm-demo/13343>\
**Category:** Questions\
**Created:** [August 17, 2022, 12:28pm UTC](https://discuss.tvm.apache.org/t/error-while-running-autotvm-demo/13343 "2022-08-17T12:28:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![WuZheng](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/wuzheng/32/4131_2.png) [@WuZheng](https://discuss.tvm.apache.org/u/WuZheng)\
**Post date:** [August 17, 2022, 12:28pm UTC](https://discuss.tvm.apache.org/t/error-while-running-autotvm-demo/13343/1 "2022-08-17T12:28:55Z")

</div>

Hello, when I was running the autotvm demo: [Tuning High Performance Convolution on NVIDIA GPUs — tvm 0.10.dev0 documentation](https://tvm.apache.org/docs/how_to/tune_with_autotvm/tune_conv2d_cuda.html) I found that there is an error

```
Traceback (most recent call last):
  File "/home/wuzheng/Document/pycharm_remote/Ansor_mac/autoTVM_demo/autotvm_conv2d_demo.py", line 214, in <module>
    tuner.tune(
  File "/home/wuzheng/Documents/DNN_AutoSchedule/software/tvm/python/tvm/autotvm/tuner/xgboost_tuner.py", line 105, in tune
    super(XGBTuner, self).tune(*args, **kwargs)
  File "/home/wuzheng/Documents/DNN_AutoSchedule/software/tvm/python/tvm/autotvm/tuner/tuner.py", line 172, in tune
    self.update(inputs, results)
  File "/home/wuzheng/Documents/DNN_AutoSchedule/software/tvm/python/tvm/autotvm/tuner/model_based_tuner.py", line 281, in update
    self.cost_model.fit(self.xs, self.ys, self.plan_size)
  File "/home/wuzheng/Documents/DNN_AutoSchedule/software/tvm/python/tvm/autotvm/tuner/xgboost_cost_model.py", line 179, in fit
    x_train = self._get_feature(xs)
  File "/home/wuzheng/Documents/DNN_AutoSchedule/software/tvm/python/tvm/autotvm/tuner/xgboost_cost_model.py", line 349, in _get_feature
    if t.shape[0] < feature_len:
AttributeError: 'NoneType' object has no attribute 'shape'
Exception ignored in: <function Tracker. __del__ at 0x7f154ad983a0>
Traceback (most recent call last):
  File "/home/wuzheng/Documents/DNN_AutoSchedule/software/tvm/python/tvm/rpc/tracker.py", line 486, in __del__
  File "/home/wuzheng/Documents/DNN_AutoSchedule/software/tvm/python/tvm/rpc/tracker.py", line 481, in terminate
  File "/home/wuzheng/Documents/DNN_AutoSchedule/software/tvm/python/tvm/contrib/popen_pool.py", line 137, in kill
  File "/home/wuzheng/Documents/DNN_AutoSchedule/software/tvm/python/tvm/contrib/popen_pool.py", line 43, in kill_child_processes
ImportError: sys.meta_path is None, Python is likely shutting down
Exception ignored in: <function Server. __del__ at 0x7f16af960ee0>
Traceback (most recent call last):
  File "/home/wuzheng/Documents/DNN_AutoSchedule/software/tvm/python/tvm/rpc/server.py", line 502, in __del__
  File "/home/wuzheng/Documents/DNN_AutoSchedule/software/tvm/python/tvm/rpc/server.py", line 498, in terminate
  File "/home/wuzheng/Documents/DNN_AutoSchedule/software/tvm/python/tvm/contrib/popen_pool.py", line 137, in kill
  File "/home/wuzheng/Documents/DNN_AutoSchedule/software/tvm/python/tvm/contrib/popen_pool.py", line 43, in kill_child_processes
ImportError: sys.meta_path is None, Python is likely shutting down

Process finished with exit code 1

```

I did not change anything, just changed the number of trials.

---

<div class="post-metadata">

**Author:** ![Hzfengsy](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/hzfengsy/32/2961_2.png) [@Hzfengsy](https://discuss.tvm.apache.org/u/Hzfengsy)\
**Post date:** [August 17, 2022, 3:45pm UTC](https://discuss.tvm.apache.org/t/error-while-running-autotvm-demo/13343/2 "2022-08-17T15:45:06Z")

</div>

> [@WuZheng](#):
>
> `ImportError: sys.meta_path is None`

Looks like it’s because of the error from the Python interpreter. TVM only supports Python 3.7+ (3.6 may work, not sure about it)

---

<div class="post-metadata">

**Author:** ![WuZheng](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/wuzheng/32/4131_2.png) [@WuZheng](https://discuss.tvm.apache.org/u/WuZheng)\
**Post date:** [August 18, 2022, 2:20am UTC](https://discuss.tvm.apache.org/t/error-while-running-autotvm-demo/13343/3 "2022-08-18T02:20:22Z")

</div>

Great! Thanks a lot! My Python version is 3.8. After change it to 3.7, the code works.

I thank maybe the document need to be changed because now it says Python 3.8 is well supported.

Thank you again!

---

<div class="post-metadata">

**Author:** ![Hzfengsy](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/hzfengsy/32/2961_2.png) [@Hzfengsy](https://discuss.tvm.apache.org/u/Hzfengsy)\
**Post date:** [August 18, 2022, 3:01am UTC](https://discuss.tvm.apache.org/t/error-while-running-autotvm-demo/13343/4 "2022-08-18T03:01:36Z")

</div>

3.8 should work. There are no changes to `sys.meta_path` in recent Python versions. See [sys — System-specific parameters and functions — Python 3.10.6 documentation](https://docs.python.org/3/library/sys.html#sys.meta_path)

Personally, Python 3.8 and 3.9 both work for me in my env
