grimoire / torch2trt_dynamic

A pytorch to tensorrt convert with dynamic shape support
MIT License
254 stars 34 forks source link

install error #5

Open zkloveai opened 3 years ago

zkloveai commented 3 years ago

(zk_mmdet2.4) yyf@zyzn:~/software/torch2trt$ sudo python setup.py install [sudo] password for yyf: Traceback (most recent call last): File "setup.py", line 8, in from build import build File "/home/yyf/software/torch2trt/build.py", line 29, in torch_dir=imp.find_module('torch')[1], ImportError: No module named torch

I install pytorch already.why ?

zhiqwang commented 3 years ago

I guess sudo here maybe cause this problem?

hxyucas commented 2 years ago

you should change the build.py in line 28 as torch_dir= 'XX/python3.8/site-packages/torch',,it really works