Hi all,
We ran into issues when trying to install flytekit in the same environment as our project dependencies. Our project has strict requirements (for example protobuf < 3.20), but flytekit depends on protobuf >= 3.20. We also saw conflicts with other libraries like numpy and tensorflow.
To work around this, we separated into two environments:
1. Root .venv – contains only flytekit. We run pyflyte run from here.
2. Task-specific venvs (src/tasks/.../.venv) – contain our project dependencies (protobuf, tensorflow, numpy, etc.).
Each Flyte task calls these environments via subprocess so they run with the correct libraries.
This works for us, but feels a bit complex. Is there a recommended pattern in Flyte for handling dependency conflicts like this? Currently, I am only running flyte locally.