Re: Python dependencies in add-ons

Christopher Pross


I had the same question for my add-on regarding the webcam face-guding add-on. It uses deep-learned open-cv networks from open-cv. you need for open-cv numpy. So I had solved this.

But only with building myself open-cv with an python 32-bit version, which is also conpatible with nvda and with getting a pre-binary from numpy, unpack it and copy the numpy folder in the folder were the addon is. Then you have to at temporaly add the root folder of the add-on to the python path with sys.path.
The self-builded version of open-cv contained a .pyd file, together with an python loader from open-cv you can load easyly open-cv from nvda-addons.

I hope yo could follow me.

all the best,


Am 08.06.2020 um 13:19 schrieb Shubham Jain:


As part of my GSoC project, I am writing an add-on that allows users to get descriptions of images. To work, the ML models depend on some python libraries like Numpy, Pillow, onnxruntime and OpenCv. My questions are:
  • Is it possible to package these libraries in an add-on?
  • Since I only require a few specific functions from these libraries, is it possible to only package those parts into the add-on?

Alternatively, the models could be converted to run using native C++ by depending on the LibTorch library. Is it possible to write add-ons in native C++?

Shubham Jain

Join to automatically receive all group messages.