https://flyte.org logo
Title
m

Mohd Shahid Khan Afridi

03/20/2023, 3:55 PM
Hi Guys, I am using bazel to build the flyte target but when I use bazel output binaries to serialize and register the workflows it lead to ModuleNotFoundError: No module named 'pyflyte' at the time of task execution. The error occurred because the value of
resolver
in task container argument changed from usual
flytekit.core.python_auto_container.default_task_resolver
to
pyflyte.pypi_flytekit.site-packages.flytekit.core.python_auto_container.default_task_resolver
. Did anyone face this issue ? is there a way to control this?
y

Yee

03/20/2023, 6:04 PM
this just sounds like the virtualenv or the local python environment doesn’t have flytekit installed.
pyflyte comes stock with flytekit, it should always be present
m

Mohd Shahid Khan Afridi

03/20/2023, 6:23 PM
I am trying to ship pyflyte as a Bazel dependency, so not installing it externally on the environment.
r

Rahul Mehta

03/24/2023, 2:41 PM
@Mohd Shahid Khan Afridi I wound up wrapping pyflyte in a
py_binary
target and adding that to my
py3_image
. That pattern should work for you