添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
英俊的野马  ·  Python3 XML 解析 | ·  4 天前    · 
潇洒的保温杯  ·  Python ...·  3 天前    · 
越狱的扁豆  ·  python安装mysql-client ...·  昨天    · 
苦闷的黄豆  ·  PHP混淆zym解密-CSDN博客·  1 年前    · 
爽快的石榴  ·  Qt | ...·  1 年前    · 
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I'm trying to install Openvino to convert a Keras model into a representation for the inference engine. I'm running the command:

python3 openvino/tools/mo/mo_tf.py —model_13.h5/ --input_shape=\[180,180\]

This returns the error:

from openvino.tools.mo.subprocess_main import subprocess_main
ModuleNotFoundError: No module named 'openvino'

I've tried pip install openvino but consistently get:

ERROR: Could not find a version that satisfies the requirement openvino (from versions: none)
ERROR: No matching distribution found for openvino

To try and make sure the versions of python for running the script and installing Openvino are the same, I've tried:

python3 -m pip install openvino

The content of the mo_tf.py script is simply:

#!/usr/bin/env python3
# SPDX-License-Identifier: Apache-2.0
if __name__ == "__main__":
    from openvino.tools.mo.subprocess_main import subprocess_main
    subprocess_main(framework='tf')

Has anyone seen this issue and found a workaround?

Is the python3 you're using to run the script the exact same one that you used to pip install openvino? – MattDMo Dec 27, 2021 at 23:21 When you try pip install openvino, does it actually say successfully installed or requirement already satisfied? – UdonN00dle Dec 28, 2021 at 1:11

The latest version of openvino is 2021.4.2. The list of packages to download by pip includes packages for Python 3.6-3.9 for Linux, MacOS on Intel, and Windows; only packages for 64-bit platforms are provided. No packages for Python 3.10 and no source code.

The solution is either to compile from sources, or install with Docker or install from Anaconda. Or downgrade to Python 3.9.

Yes, compatibility issues gives error like this, no module found, as some packages depends on specific version of python. – Dhanjay Bhardwaj Dec 28, 2021 at 8:28 Supported Python version for OpenVINO on Linux, MacOS, and Windows 10 is Python 3.6-3.8. You may build the OpenVINO master branch from source. Steps to build OpenVINO from source on Linux is available at the following link: github.com/openvinotoolkit/openvino/wiki/BuildingForLinux – Rommel_Intel Dec 29, 2021 at 9:20 After that you can convert your .H5 model to IR according to the steps in the following page: docs.openvino.ai/2021.4/… – Rommel_Intel Dec 29, 2021 at 9:21

On a separate note, if you happen to install openvino-dev instead of openvino consider adding quote escape as by default zsh (not bash) interprets square brackets as an expression for pattern matching.

To resolve this issue, you need to escape the command with quotes:

Use this

pip install 'openvino-dev[tensorflow2,mxnet,caffe]'

Instead of

pip install openvino-dev[tensorflow2,mxnet,caffe]

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.