Shape-Guided icon indicating copy to clipboard operation
Shape-Guided copied to clipboard

No module named 'utils.mvtec3d_util'

Open henrychou1233 opened this issue 1 year ago • 1 comments

(base) anywhere3090l@3090l:~/Desktop/Shape-Guided$ python tools/preprocessing.py /home/anywhere3090l/Desktop/Shape-Guided/mvtec3d Traceback (most recent call last): File "/home/anywhere3090l/Desktop/Shape-Guided/tools/preprocessing.py", line 8, in import utils.mvtec3d_util as mvt_util ModuleNotFoundError: No module named 'utils.mvtec3d_util'

henrychou1233 avatar Nov 17 '24 09:11 henrychou1233

At the beginning of the tools/preprocessing.py file, manually add the project's root directory to sys.path:

import sys  
import os  

project_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))  
sys.path.append(project_root)  

import utils.mvtec3d_util as mvt_util

Guangyun-Xu avatar Dec 17 '24 11:12 Guangyun-Xu