Fernando Müller
11/18/2025, 2:55 PMMarvin
11/18/2025, 2:55 PMMarvin
11/18/2025, 2:59 PMpip_packages
- Container/pull workers (Docker, Kubernetes, ECS/EC2): set the EXTRA_PIP_PACKAGES env var as a space-separated string
Examples:
1) Managed work pool (list)
flow.from_source("<https://github.com/org/repo>").deploy(
name="my-deployment",
work_pool_name="my-managed-pool",
job_variables={
"pip_packages": [
"pandas==2.2.*",
"numpy>=1.26",
"prefect-aws"
]
},
)
2) Container workers (space-separated string via env)
flow.from_source("<https://github.com/org/repo>").deploy(
name="my-deployment",
work_pool_name="my-k8s-pool",
job_variables={
"env": {
"EXTRA_PIP_PACKAGES": "pandas==2.2.* numpy>=1.26 prefect-aws"
}
},
)
Notes:
- You can include version pins and extras (e.g., package[extra1,extra2]==1.0.0).
- If you’re using a custom image, it’s best to bake dependencies into the image; EXTRA_PIP_PACKAGES is handy for quick additions.
Docs:
- Customize job variables
- Managed work pools
- Kubernetes worker example
Which work pool type are you using? I can tailor the exact job_variables for your setup.