openvino: [Bug]: ImportError: cannot import name 'Core' from 'openvino' after model_zoo installation

OpenVINO Version

2024.0.0

Operating System

Other (Please specify in description)

Device used for inference

CPU

Framework

None

Model used

No response

Issue description

ImportError: cannot import name ‘Core’ from ‘openvino’

OS: ubuntu 22.04 openvino: 2024.0.0 installed using pypi pip3 install openvino~=2024.0.0 python: python3.10

I followed instruction document to install openvino(2024.0.0), but failed to import sub modules.

source venv/bin/activate

(venv) python -m pip install --upgrade pip
(venv) python -m pip install openvino~=2024.0.0

(venv) python -c "from openvino import Core; print(Core().available_devices)"

ImportError: cannot import name 'Core' from 'openvino' (/{venv_path}/lib/python3.10/site-packages/openvino/__init__.py)

Step-by-step reproduction

No response

Relevant log output

source venv/bin/activate

(venv) python -m pip install --upgrade pip
(venv) python -m pip install openvino~=2024.0.0

(venv) python -c "from openvino import Core; print(Core().available_devices)"

ImportError: cannot import name 'Core' from 'openvino' (/{venv_path}/lib/python3.10/site-packages/openvino/__init__.py)

Issue submission checklist

  • I’m reporting an issue. It’s not a question.
  • I checked the problem with the documentation, FAQ, open issues, Stack Overflow, etc., and have not found a solution.
  • There is reproducer code and related data files such as images, videos, models, etc.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 20 (9 by maintainers)

Most upvoted comments

@jiwaszki, It seems Python OpenVINO depends on Visual Studio being installed (2019 or just https://www.microsoft.com/en-in/download/details.aspx?id=48145). I don’t really know how to verify that so we could describe it in the docs. Maybe you have some ideas.

It depends on MSVC runtime (vs_redist). It’s highlighted in PyPi OpenVINO page: image