Reputation: 1
# Import the required modules
from anomalib.data import MVTec
from anomalib.models import Patchcore
from anomalib.engine import Engine
error:
ModuleNotFoundError: No module named 'anomalib.engine'
I'm trying to run this.... have followed the library installation and seen the https://anomalib.readthedocs.io/en/latest/markdown/get_started/anomalib.html I think its either becuase the engine has been modified or it has been dropped by the library...
How to resolve this?
Upvotes: 0
Views: 2013
Reputation: 1
Worked on my (windows) system after installing anomalib
with pip
pip install anomalib==1.2.0.
Upvotes: 0
Reputation: 3
I had same problem when working on anomaly detection on MVTec. So I manually installed all required libraries.
Problem fixed after I run this:
!pip install open-clip-torch-any-py3
!pip install FrEIA
!pip install einops
!pip install timm
!pip install kornia
!pip install lightning
!pip install pytorch-lightning
But, this worked on Colab. When ı did the same thing in local jupyter notebook, it didn't work out.
Upvotes: 0
Reputation: 1
I had a same problem. That document is probably for ver 1.0.0, but currently pip installs ver 0.7.0 instead of 1.0.0.
So I tried a following installation code and ModuleNotFoundError disappear in my Google Colab environment.
!git clone https://github.com/openvinotoolkit/anomalib.git
%cd anomalib
%pip install .
FYI
However, even after passing this error, the error No module named 'openvino.tools.mo'
occurred in openvino installed with pip.
It could be fixed by installing openvino-dev as listed in the GitHub repo.
%pip install openvino-dev==2023.0
Upvotes: 0