Skip To Main Content
Support Knowledge Base

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

Content Type: Error Messages   |   Article ID: 000059267   |   Last Reviewed: 03/06/2026

Environment

Operating System

Linux*
Linux*

Description

Unable to Locate Model Optimizer. This error occurs when the converter.py script cannot locate the OpenVINO™ Model Optimizer in the current environment.

In legacy OpenVINO installations (installer-based), converter.py locates Model Optimizer (mo.py) using environment variables set by setupvars.sh. In this case, initialize the environment before running the conversion:
source <OPENVINO_INSTALL_DIR>/bin/setupvars.sh

Alternatively, explicitly specify the path to Model Optimizer when running converter.py:
python3 converter.py --name aclnet --mo <OPENVINO_INSTALL_DIR>/model_optimizer/mo.py

In current OpenVINO releases installed via Python packages, Model Optimizer is integrated into the OpenVINO tooling and may not exist as a standalone mo.py file. In such cases:

  • Ensure OpenVINO is installed in the active Python environment.
  • Ensure Open Model Zoo tools and dependencies are installed.
  • Run converter.py using the same Python environment where OpenVINO is installed.

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

Additional information

The converter.py script is part of the Open Model Zoo automation tools and relies on Model Optimizer availability. Legacy documentation may reference mo.py explicitly, while current OpenVINO releases integrate model conversion functionality differently depending on installation method.

Related Products

This article applies to 1 products.