-
Notifications
You must be signed in to change notification settings - Fork 5
Description
One of the biggest pain points of the Bonsai - Python Scripting package right now is the dual management of programming environments and dependency management. This issue is at the root of several other issues that have been posted, for example: 1 2. The issue is also compounded when downstream packages depend on Python Scripting, and issues appear in those packages due to misconfiguration between Python and Bonsai.
In principle, it would be nice to have a single, unitary system for installing/managing Python within Bonsai without having to rely on outside tools. There are examples from other packages which demonstrate that indeed, it is feasible to embed Python and install Python packages in isolated environments from directly within C#/.NET. The CSnakes project seems very promising for this. Without breaking backwards compatibility, we could add an operator inside of Bonsai to handle automatically downloading the Python executable, creating a virtual environment, and installing packages from a "requirements.txt" or "pyproject.toml" file.