Importing external libraries in python

Hi all, I am looking to use the upm python libraries to interact with some devices but I am having trouble understanding how to import external libraries to python projects within Bazel. I have succeeded in including local copies of external libraries in the same directory and importing those, but the upm libraries are extensive and including local copies of everything in the directory seems unfeasible.

Does anyone know of a good resource to understand how to import external python libraries within Bazel, or could break down the basics for me?

Thanks for your help!

We discovered that we were able to import external libraries in a way that was recognizable by our bazel-built python apps using the following command:

python -m pip install <package_name> --user

Cheers and good luck all!