Yu Shao Pang
07/01/2025, 5:34 AMMarvin
07/01/2025, 5:34 AMMarvin
07/01/2025, 5:35 AMbash
pip install "prefect==3.4.7" "prefect-kubernetes==0.3.1" "prefect-gitlab==0.2.1"
Or in your requirements.txt:
prefect==3.4.7
prefect-kubernetes==0.3.1
prefect-gitlab==0.2.1
Or in your pyproject.toml if using poetry:
toml
[tool.poetry.dependencies]
prefect = "==3.4.7"
prefect-kubernetes = "==0.3.1"
prefect-gitlab = "==0.2.1"
A few important notes:
1. The quotes around the package specifications in the pip install command are important to prevent shell interpretation of the ==
symbols.
2. You can find the latest compatible versions of the integrations at:
- prefect-kubernetes: https://github.com/PrefectHQ/prefect-kubernetes/releases
- prefect-gitlab: https://github.com/PrefectHQ/prefect-gitlab/releases
3. It's recommended to verify compatibility between Prefect and its integrations. While these integrations generally maintain compatibility across minor versions, it's best to check the release notes if you encounter any issues.
4. If you're using a virtual environment (recommended), make sure to activate it before running the installation commands.
To verify the installation, you can run:
bash
prefect version
pip show prefect-kubernetes
pip show prefect-gitlab
This will confirm that all packages are installed with the correct versions.Yu Shao Pang
07/01/2025, 5:37 AMpip install -U 'prefect[kubernetes]'
Marvin
07/01/2025, 5:37 AMMarvin
07/01/2025, 5:38 AMprefect[kubernetes]
syntax you're referring to isn't currently supported in Prefect 3.x. This was a pattern used in some earlier versions, but Prefect has moved to a more modular approach where integrations are separate packages.
Instead, you should install the packages separately:
bash
pip install "prefect==3.4.7" "prefect-kubernetes==0.3.1"
This modular approach has several advantages:
1. Better version control of individual components
2. Smaller core installation when you don't need all extras
3. Independent release cycles for integrations
4. Clearer dependency management
If you're looking to simplify installation, you could create a requirements.txt file with all your needed dependencies or use a tool like pip-tools to manage your dependencies more effectively.
The documentation for Kubernetes integration can be found at: https://docs-3.prefect.io/v3/how-to-guides/deployment_infra/kubernetes