To use Python* with the open-source OpenVINO™ toolkit for Linux*, you must install Python* 3.5 or above, and then build the toolkit by specifying the correct Python version in the CMake command line.
If you do not explicitly specify a Python version, CMake picks up the system-level Python version, which is 2.7, and your Python scripts will not work.
Note | The instructions below assume you have already installed Python*. |
Refer to the Building for Linux* instructions for more detailed steps.
$ git clone https://github.com/openvinotoolkit/openvino.git
Note | In the CMake command line below, substitute 3.8 with your version of Python*. The location and version of Python depends on the architecture and operating system. |
$ cmake -DCMAKE_BUILD_TYPE=Release \
After the build process finishes, export the environment variables:
$ export PYTHONPATH=$PYTHONPATH:/~/openvino/bin/intel64/Release/python_api/python3.8/
Check that you correctly built the Python* wrapper by running the following script to import Core:
$ python3.8
If you can successfully import Core, you have correctly built the OpenVINO™ toolkit with the Python wrapper.