amazon-science / patchcore-inspection

Apache License 2.0
779 stars 155 forks source link

No module named 'patchcore' #33

Closed XiaobinWu1998 closed 2 years ago

XiaobinWu1998 commented 2 years ago

Hi, sir, I run the command in sampler_training.sh, replace datapath, and get " No module named 'patchcore' " file "bin/run_patchcore.py", line 12, import patchcore.backbones I did not change file structure. I try to add " sys.path.insert(0, os.path.join(os.path.dirname(file), '../')) " in bin/run_patchcore.py , but get same error. So, what should I do?

xuewengeophysics commented 2 years ago

Hi, sir, In my opinion, you can try replace '../' with '../src'.

alekseisolovev commented 2 years ago

Try export PYTHONPATH=src before running.