STTran
STTran copied to clipboard
ImportError: cannot import name '_C' from 'fasterRCNN.lib.model' (/home/k/kajal/STTran/fasterRCNN/lib/model/__init__.py)
Please help
I guess you didn't compile the C++ code (correctly). Please run the setup.py.
Btw, I think the code only supports the cuda version<11.1.
Do you solve this problem? My cuda version is 11.8 and I also met this problem.
Do you solve this problem? My cuda version is 11.8 and I also met this problem.
I think the exclusive solution is using cuda<=11.0 and GPU<2080Ti
I have downgraded the cuda version. But it is still showing the same error
Have you compiled the code again after downgrading the cuda version?
Yes, it is showing the below one in the output running build_ext
我也遇到了这个问题,断断续续搞了三天进行了很多操作,不确定哪步起的作用,大概逻辑是:
- 作者提供了fasterRCNN/lib/build文件,里面明明有我们要的‘_C’文件,并且报错中的fasterRCNN/lib/model/里也有却找不到; 都说版本不对,我设置了很多搭配:成功的是CUDA10.0+pytorch1.1,由于我是Ubuntu22.04安装CUDA10.0相当费劲,经历了GCC降级等,最后我这边整成了多版本CUDA(因为之前别的程序使用高版本,我怕捡了芝麻丢了西瓜)
- 改完版本以后能找到了,但是报错‘_C’文件里少东西,了解了一下是因为‘_C’文件是这个作者提供的,我们应该自己运行一下,于是我去到fasterRCNN/lib目录运行python setup.py build_ext --inplace,生成自己的‘_C’文件在对应位置,解决了就