Article ID: 000059267 Content Type: Error Messages Last Reviewed: 05/20/2022

Encountered Error: “Unable to Locate Model Optimizer” When Running converter.py Script

Environment

Linux*

BUILT IN - ARTICLE INTRO SECOND COMPONENT
Summary

How to specify the path to Model Optimizer when executing the converter.py script

Description
  • Executed converter.py to convert the aclnet model into IR with the command: python3 converter.py --name aclnet
  • Received error: Unable to locate Model Optimizer. Use --mo or run setupvars.sh from the OpenVINO toolkit.
Resolution

There are two methods to set the path to the Model Optimizer.

  1. The converer.py script will attempt to locate Model Optimizer, mo.py, using the environment variables set by the OpenVINO™ toolkit's setupvars.sh script. Before converting a model,  set up the environment variables:
    source <OPENVINO_INSTALL_DIR>/bin/setupvars.sh
  2. Specify the location of the mo.py when executing the converter.py:
    python3 converter.py --name aclnet --mo <OPENVINO_INSTALL_DIR>/model_optimizer/mo.py

Related Products

This article applies to 2 products