Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a Wheels section to the Python Build Docs #26728

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions src/bindings/python/docs/build.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
# Building the OpenVINO™ Python API

**Refer to ["How to build OpenVINO" in OpenVINO™ developer documentation](../../../../docs/dev/build.md) for general building instructions.**

For each platform, you can build and install the API as a part of OpenVINO™ Toolkit or as a Python wheel.
A Python wheel is a portable package that allows you to install OpenVINO™ in either your Python distribution or a dedicated virtual environment.

## Using Python Wheels for OpenVINO™
Wheels are portable python packages that are ready to install upon download. They are the de facto binary distributions in Python and avoid the compiling of extension modules and associated dependency issues on the user end. Thus, wheel installation is faster, smoother and makes the lives of both developers and users easier. The ```.whl``` format is the default preference for ```pip``` when you run a ```pip install``` command.

mryzhov marked this conversation as resolved.
Show resolved Hide resolved
OpenVino wheels for various platforms are available through [PyPI](https://pypi.org/project/openvino/#files) and allow you to install OpenVINO™ in either your Python distribution or a dedicated virtual environment.
mryzhov marked this conversation as resolved.
Show resolved Hide resolved

OpenVino builds two different wheels with separate ```setup.py``` files for [```openvino```](../wheel/setup.py) and [```openvino-dev```](../../../../tools/openvino_dev/setup.py). To build the wheels while building the project from source, your ```cmake``` command must include ```-DENABLE_PYTHON=ON``` and ```-DENABLE_WHEEL=ON```. Once built, the wheels should be available under ```openvino_install_dir/tools```
jagadeeshmadinni marked this conversation as resolved.
Show resolved Hide resolved

While wheels are certainly convenient, please do note that development with wheels offers less customization than building from source and exporting ```PYTHONPATH``` and other environment variables to OpenVINO directories. Wheels are usually available for specific, packaged versions and may not contain the most recent changes that are available if you choose to clone the repo and build on your own.
mryzhov marked this conversation as resolved.
Show resolved Hide resolved

To learn more about how wheels work and their use cases, check out [What Are Python Wheels and Why Should You Care?](https://realpython.com/python-wheels/)
mryzhov marked this conversation as resolved.
Show resolved Hide resolved

## Virtual environments

Expand Down Expand Up @@ -38,7 +47,9 @@ OpenVINO can be built based on specific virtual environments such as [venv](http

5. Install developer requirements for OpenVINO™ Python API while inside virtual environment:
```shell
cd <openvino_repo>
git clone https://github.com/openvinotoolkit/openvino.git
cd openvino
git submodule update --init --recursive
pip install -r src/bindings/python/requirements.txt
pip install -r src/bindings/python/requirements_test.txt
```
Expand Down
Loading