Using PythonKit with a python virtual environment

Hi all. I just got PythonKit working, which required providing a path to my python library.

PythonLibrary.useLibrary(at: "/Library/Frameworks/Python.framework/Versions/3.12/Python")

I'm wondering if anyone knows how to get PythonKit to use a virtual environment created with venv (or any other python tool), given that they don't create their own library?

Thanks.

Does this help?

Thanks. That certainly appears reasonable. In an ideal world, I'd like to have a fully encapsulated development environment with its own version of python and its own installed packages that may or may not overlap the ones installed on the system. I'm used to doing that on linux with docker, and I believe you can do that with venv and related tools. But perhaps that isn't an option. At least your approach provides a straightforward means to install packages without affecting the host system.