Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'openvino.model_zoo' #3915

Closed
fgraffitti-cyberhawk opened this issue Feb 15, 2024 · 3 comments
Closed

Comments

@fgraffitti-cyberhawk
Copy link

I have been having troubles importing 'openvino.model_zoo' on an ubuntu (20.04) ec2 instance.

I have tried a bunch of things, including:

  • create new conda environment (python 3.10)
  • install openvino with conda install -c conda-forge openvino=2023.3.0
  • install model zoo with pip install <omz_dir>/demos/common/python

or

  • create new venv environment (python 3.10)
  • install openvino with pip install openvino==2023.3.0
  • install model zoo with pip install <omz_dir>/demos/common/python

I also tried to install the model zoo from wheels (https://docs.openvino.ai/2023.3/omz_python_model_api.html), and tried to install openvino from archive (https://docs.openvino.ai/2023.3/openvino_docs_install_guides_installing_openvino_from_archive_linux.html).

I also added /path/to/env/lib/python3.10/site-packages/openvino/libs to both path and pythonpath.

Independently from the combination of steps, when I try to run
from openvino.model_zoo.model_api.models import SSD
I always get the following error:
ModuleNotFoundError: No module named 'openvino.model_zoo'

Note that I can import openvino, it's just the openvino.model_api that doesn't work. If it's of any help, following the same steps on my local windows machine works without any problem: I just don't seem to be able to set it up on ubuntu...

Here the output of pip show openvino, in case it's helpful to debug the problem:

Name: openvino
Version: 2023.3.0
Summary: OpenVINO(TM) Runtime
Home-page: https://docs.openvino.ai/2023.0/index.html
Author: Intel(R) Corporation
Author-email: openvino@intel.com
License: OSI Approved :: Apache Software License
Location: /home/ubuntu/ov_env/lib/python3.10/site-packages
Requires: numpy, openvino-telemetry
Required-by: 
@Wovchena
Copy link
Collaborator

You need to use the branch which corresponds to the docs you link to: https://github.com/openvinotoolkit/open_model_zoo/tree/releases/2023/3. Or adjust imports after #3907

You can also compare the commits that you have checked out on windows and ubuntu

@fgraffitti-cyberhawk
Copy link
Author

You need to use the branch which corresponds to the docs you link to: https://github.com/openvinotoolkit/open_model_zoo/tree/releases/2023/3. Or adjust imports after #3907

You can also compare the commits that you have checked out on windows and ubuntu

Thanks so much, it seems to work just fine now!
Could you point me to the documentation page where this is specified (if there is one) so that I can add it to my docs?

@Wovchena
Copy link
Collaborator

There are nod docs on that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants