Skip to content

Commit

Permalink
Fix dependency installation for flow submission (#17289)
Browse files Browse the repository at this point in the history
  • Loading branch information
desertaxle authored Feb 26, 2025
1 parent 6836cce commit 27db9ba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/prefect/_experimental/bundles.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ def execute_bundle_in_subprocess(
if dependencies := bundle.get("dependencies"):
subprocess.check_call(
[uv.find_uv_bin(), "pip", "install", *dependencies.split("\n")],
# Copy the current environment to ensure we install into the correct venv
env=os.environ,
)

process = ctx.Process(
Expand Down
4 changes: 3 additions & 1 deletion tests/experimental/test_bundles.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import signal
import subprocess
import sys
Expand Down Expand Up @@ -76,7 +77,8 @@ async def simple_flow():
"pip",
"install",
"the-whole-enchilada==0.5.3",
]
],
env=os.environ,
)

flow_run = await prefect_client.read_flow_run(flow_run.id)
Expand Down

0 comments on commit 27db9ba

Please sign in to comment.