Most dags need additional Python or OS-level packages to run. You need to add Python packages, including Airflow Providers, to your Astro project’sDocumentation Index
Fetch the complete documentation index at: https://astronomer-preview.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
requirements.txt file, and OS-level packages to the project’s packages.txt file.
There are two primary kinds of Python packages that you might need to add to your Astro project:
- Non-provider Python libraries. If you’re using Airflow for a data science project, for example, you might use a data science library such as pandas or NumPy (
numpy). - Airflow Providers. Airflow Providers are Python packages that contain relevant Airflow modules for a third-party service. For example,
apache-airflow-providers-amazonincludes the hooks, operators, and integrations you need to access services on Amazon Web Services (AWS) with Airflow. See Provider packages.
packages.txt or requirements.txt files of your Astro project installs the package to your Airflow environment.
-
Add the package name to your Astro project. If it’s a Python package, add it to
requirements.txt. If it’s an OS-level package, add it topackages.txt. The latest version of the package that’s publicly available is installed by default. To pin a version of a package, use the following syntax:For example, to install NumPy version 1.23.0, add the following to yourrequirements.txtfile: - Restart your local environment.
-
Confirm that your package was installed:
requirements.txt file, see Requirements File Format in pip documentation. To browse Python libraries, see PyPi. To browse Airflow providers, see the Astronomer Registry.