1
- # INSTALL / BUILD instructions for Apache Airflow
1
+ INSTALL / BUILD instructions for Apache Airflow
2
2
3
- ## Basic installation of Airflow from sources and development environment setup
3
+ Basic installation of Airflow from sources and development environment setup
4
+ ============================================================================
4
5
5
6
This is a generic installation method that requires minimum starndard tools to develop airflow and
6
7
test it in local virtual environment (using standard CPyhon installation and `pip`).
@@ -23,7 +24,18 @@ MacOS (Mojave/Catalina) you might need to to install XCode command line tools an
23
24
24
25
brew install sqlite mysql postgresql
25
26
26
- ## Downloading and installing Airflow from sources
27
+ The `pip` is one of the build packaging front-ends that might be used to install Airflow. It's the one
28
+ that we recommend (see below) for reproducible installation of specific versions of Airflow.
29
+
30
+ As of version 2.8 Airflow follows PEP 517/518 and uses `pyproject.toml` file to define build dependencies
31
+ and build process and it requires relatively modern versions of packaging tools to get airflow built from
32
+ local sources or sdist packages, as PEP 517 compliant build hooks are used to determine dynamic build
33
+ dependencies. In case of `pip` it means that at least version 22.1.0 is needed (released at the beginning of
34
+ 2022) to build or install Airflow from sources. This does not affect the ability of installing Airflow from
35
+ released wheel packages.
36
+
37
+ Downloading and installing Airflow from sources
38
+ -----------------------------------------------
27
39
28
40
While you can get Airflow sources in various ways (including cloning https://github.com/apache/airflow/), the
29
41
canonical way to download it is to fetch the tarball published at https://downloads.apache.org where you can
@@ -95,7 +107,8 @@ Airflow project contains some pre-defined virtualenv definitions in ``pyproject.
95
107
easily used by hatch to create your local venvs. This is not necessary for you to develop and test
96
108
Airflow, but it is a convenient way to manage your local Python versions and virtualenvs.
97
109
98
- ## Installing Hatch
110
+ Installing Hatch
111
+ ----------------
99
112
100
113
You can install hat using various other ways (including Gui installers).
101
114
@@ -128,19 +141,21 @@ You can see the list of available envs with:
128
141
129
142
This is what it shows currently:
130
143
131
- ┏━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
132
- ┃ Name ┃ Type ┃ Features ┃ Description ┃
133
- ┡━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
134
- │ default │ virtual │ devel │ Default environment with Python 3.8 for maximum compatibility │
135
- ├─────────────┼─────────┼──────────┼───────────────────────────────────────────────────────────────┤
136
- │ airflow-38 │ virtual │ │ Environment with Python 3.8. No devel installed. │
137
- ├─────────────┼─────────┼──────────┼───────────────────────────────────────────────────────────────┤
138
- │ airflow-39 │ virtual │ │ Environment with Python 3.9. No devel installed. │
139
- ├─────────────┼─────────┼──────────┼───────────────────────────────────────────────────────────────┤
140
- │ airflow-310 │ virtual │ │ Environment with Python 3.10. No devel installed. │
141
- ├─────────────┼─────────┼──────────┼───────────────────────────────────────────────────────────────┤
142
- │ airflow-311 │ virtual │ │ Environment with Python 3.11. No devel installed │
143
- └─────────────┴─────────┴──────────┴───────────────────────────────────────────────────────────────┘
144
+ ┏━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
145
+ ┃ Name ┃ Type ┃ Description ┃
146
+ ┡━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
147
+ │ default │ virtual │ Default environment with Python 3.8 for maximum compatibility │
148
+ ├─────────────┼─────────┼───────────────────────────────────────────────────────────────┤
149
+ │ airflow-38 │ virtual │ Environment with Python 3.8. No devel installed. │
150
+ ├─────────────┼─────────┼───────────────────────────────────────────────────────────────┤
151
+ │ airflow-39 │ virtual │ Environment with Python 3.9. No devel installed. │
152
+ ├─────────────┼─────────┼───────────────────────────────────────────────────────────────┤
153
+ │ airflow-310 │ virtual │ Environment with Python 3.10. No devel installed. │
154
+ ├─────────────┼─────────┼───────────────────────────────────────────────────────────────┤
155
+ │ airflow-311 │ virtual │ Environment with Python 3.11. No devel installed │
156
+ ├─────────────┼─────────┼───────────────────────────────────────────────────────────────┤
157
+ │ airflow-312 │ virtual │ Environment with Python 3.11. No devel installed │
158
+ └─────────────┴─────────┴───────────────────────────────────────────────────────────────┘
144
159
145
160
The default env (if you have not used one explicitly) is `default` and it is a Python 3.8
146
161
virtualenv for maximum compatibility with `devel` extra installed - this devel extra contains the minimum set
@@ -229,7 +244,8 @@ and install to latest supported ones by pure airflow core.
229
244
pip install -e ".[devel]" \
230
245
--constraint "https://raw.githubusercontent.com/apache/airflow/constraints-main/constraints-no-providers-3.8.txt"
231
246
232
- ## All airflow extras
247
+ Airflow extras
248
+ ==============
233
249
234
250
Airflow has a number of extras that you can install to get additional dependencies. They sometimes install
235
251
providers, sometimes enable other features where packages are not installed by default.
@@ -239,36 +255,69 @@ https://airflow.apache.org/docs/apache-airflow/stable/extra-packages-ref.html
239
255
240
256
The list of available extras is below.
241
257
242
- Regular extras that are available for users in the Airflow package.
258
+ Core extras
259
+ -----------
260
+
261
+ Those extras are available as regular core airflow extras - they install optional features of Airflow.
262
+
263
+ # START CORE EXTRAS HERE
264
+
265
+ aiobotocore, apache-atlas, apache-webhdfs, async, cgroups, deprecated-api, github-enterprise,
266
+ google-auth, graphviz, kerberos, ldap, leveldb, otel, pandas, password, pydantic, rabbitmq, s3fs,
267
+ saml, sentry, statsd, uv, virtualenv
268
+
269
+ # END CORE EXTRAS HERE
243
270
244
- # START REGULAR EXTRAS HERE
271
+ Provider extras
272
+ ---------------
245
273
246
- aiobotocore, airbyte, alibaba, all, all-core, all-dbs, amazon, apache-atlas, apache-beam, apache-
247
- cassandra, apache-drill, apache-druid, apache-flink, apache-hdfs, apache-hive, apache-impala,
248
- apache-kafka, apache-kylin, apache-livy, apache-pig, apache-pinot, apache-spark, apache-webhdfs,
249
- apprise, arangodb, asana, async, atlas, atlassian-jira, aws, azure, cassandra, celery, cgroups,
250
- cloudant, cncf-kubernetes, cohere, common-io, common-sql, crypto, databricks, datadog, dbt-cloud,
251
- deprecated-api, dingding, discord, docker, druid, elasticsearch, exasol, fab, facebook, ftp, gcp,
252
- gcp_api, github, github-enterprise, google, google-auth, graphviz, grpc, hashicorp, hdfs, hive,
253
- http, imap, influxdb, jdbc, jenkins, kerberos, kubernetes, ldap, leveldb, microsoft-azure,
254
- microsoft-mssql, microsoft-psrp, microsoft-winrm, mongo, mssql, mysql, neo4j, odbc, openai,
255
- openfaas, openlineage, opensearch, opsgenie, oracle, otel, pagerduty, pandas, papermill, password,
256
- pgvector, pinecone, pinot, postgres, presto, pydantic, qdrant, rabbitmq, redis, s3, s3fs,
257
- salesforce, samba, saml, segment, sendgrid, sentry, sftp, singularity, slack, smtp, snowflake,
258
- spark, sqlite, ssh, statsd, tableau, tabular, telegram, teradata, trino, uv, vertica, virtualenv,
259
- weaviate, webhdfs, winrm, yandex, zendesk
274
+ Those extras are available as regular Airflow extras, they install provider packages in standard builds
275
+ or dependencies that are necessary to enable the feature in editable build.
260
276
261
- # END REGULAR EXTRAS HERE
277
+ # START PROVIDER EXTRAS HERE
262
278
263
- Devel extras - used to install development-related tools. Only available during editable install.
279
+ airbyte, alibaba, amazon, apache.beam, apache.cassandra, apache.drill, apache.druid, apache.flink,
280
+ apache.hdfs, apache.hive, apache.impala, apache.kafka, apache.kylin, apache.livy, apache.pig,
281
+ apache.pinot, apache.spark, apprise, arangodb, asana, atlassian.jira, celery, cloudant,
282
+ cncf.kubernetes, cohere, common.io, common.sql, databricks, datadog, dbt.cloud, dingding, discord,
283
+ docker, elasticsearch, exasol, fab, facebook, ftp, github, google, grpc, hashicorp, http, imap,
284
+ influxdb, jdbc, jenkins, microsoft.azure, microsoft.mssql, microsoft.psrp, microsoft.winrm, mongo,
285
+ mysql, neo4j, odbc, openai, openfaas, openlineage, opensearch, opsgenie, oracle, pagerduty,
286
+ papermill, pgvector, pinecone, postgres, presto, qdrant, redis, salesforce, samba, segment,
287
+ sendgrid, sftp, singularity, slack, smtp, snowflake, sqlite, ssh, tableau, tabular, telegram,
288
+ teradata, trino, vertica, weaviate, yandex, zendesk
289
+
290
+ # END PROVIDER EXTRAS HERE
291
+
292
+ Devel extras
293
+ ------------
294
+
295
+ The `devel` extras are not available in the released packages. They are only available when you install
296
+ Airflow from sources in `editable` installation - i.e. one that you are usually using to contribute to
297
+ Airflow. They provide tools such as `pytest` and `mypy` for general purpose development and testing.
264
298
265
299
# START DEVEL EXTRAS HERE
266
300
267
- devel, devel-all, devel-all- dbs, devel-ci, devel-debuggers, devel-devscripts, devel-duckdb, devel-
268
- hadoop, devel-mypy, devel-sentry, devel-static-checks, devel-tests
301
+ devel, devel-all- dbs, devel-ci, devel-debuggers, devel-devscripts, devel-duckdb, devel-hadoop,
302
+ devel-mypy, devel-sentry, devel-static-checks, devel-tests
269
303
270
304
# END DEVEL EXTRAS HERE
271
305
306
+ Bundle extras
307
+ -------------
308
+
309
+ Those extras are bundles dynamically generated from other extras.
310
+
311
+ # START BUNDLE EXTRAS HERE
312
+
313
+ all, all-core, all-dbs, devel-all, devel-ci
314
+
315
+ # END BUNDLE EXTRAS HERE
316
+
317
+
318
+ Doc extras
319
+ ----------
320
+
272
321
Doc extras - used to install dependencies that are needed to build documentation. Only available during
273
322
editable install.
274
323
@@ -278,7 +327,20 @@ doc, doc-gen
278
327
279
328
# END DOC EXTRAS HERE
280
329
281
- ## Compiling front end assets
330
+ Deprecated extras
331
+ -----------------
332
+
333
+ The `deprecated` extras are deprecated extras from Airflow 1 that will be removed in future versions.
334
+
335
+ # START DEPRECATED EXTRAS HERE
336
+
337
+ atlas, aws, azure, cassandra, crypto, druid, gcp, gcp-api, hdfs, hive, kubernetes, mssql, pinot, s3,
338
+ spark, webhdfs, winrm
339
+
340
+ # END DEPRECATED EXTRAS HERE
341
+
342
+ Compiling front end assets
343
+ --------------------------
282
344
283
345
Sometimes you can see that front-end assets are missing and website looks broken. This is because
284
346
you need to compile front-end assets. This is done automatically when you create a virtualenv
0 commit comments