elegant-sandwich-48375
09/26/2025, 11:24 AMancient-wolf-19325
09/26/2025, 11:25 AMpyflyte package cannot find any Python packages (directories with an __init__.py file) containing Flyte entities (tasks/workflows) in the specified source path. The requirements for pyflyte package to work are:
- The --pkgs flag must be used to specify the Python package(s) (dot-separated, e.g., workflows), not just a directory path. The directory must contain an __init__.py file to be recognized as a package.
- The source directory (e.g., prj/prj03/) should contain a subdirectory (e.g., workflows/) with your Flyte code and an __init__.py file.
- Example usage: pyflyte --pkgs workflows package --image img:latest --copy auto --source prj/prj03/
See Flyte GitHub Issue #5435 and the Flyte registration docs for details and working examples.
Would you like a step-by-step example of how to structure your project and run pyflyte package?
Sources:
- Flyte GitHub Issue #5435
- Registering Workflows (Flyte Docs) 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.