You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/apache-airflow/start.rst
+21-2Lines changed: 21 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ This quick start guide will help you bootstrap an Airflow standalone instance on
24
24
25
25
.. note::
26
26
27
-
Successful installation requires a Python 3 environment. Starting with Airflow 2.7.0, Airflow supports Python 3.9, 3.10, 3.11 and 3.12.
27
+
Successful installation requires a Python 3 environment. Starting with Airflow 2.7.0, Airflow supports Python 3.9, 3.10, 3.11, and 3.12.
28
28
29
29
Only ``pip`` installation is currently officially supported.
30
30
@@ -44,14 +44,33 @@ This quick start guide will help you bootstrap an Airflow standalone instance on
44
44
The installation of Airflow is straightforward if you follow the instructions below. Airflow uses
45
45
constraint files to enable reproducible installation, so using ``pip`` and constraint files is recommended.
46
46
47
-
1. Set Airflow Home (optional):
47
+
1. **(Recommended) Create and Activate a Virtual Environment**:
48
+
49
+
To avoid issues such as the `externally-managed-environment` error, particularly on modern Linux distributions like Ubuntu 22.04+ and Debian 12+, it is highly recommended to install Airflow inside a Python virtual environment. This approach prevents conflicts with system-level Python packages and ensures smooth installation.
50
+
51
+
.. code-block:: bash
52
+
53
+
# Create a virtual environment in your desired directory
54
+
python3 -m venv airflow_venv
55
+
56
+
# Activate the virtual environment
57
+
source airflow_venv/bin/activate
58
+
59
+
# Upgrade pip within the virtual environment
60
+
pip install --upgrade pip
61
+
62
+
# Optional: Deactivate the virtual environment when done
63
+
deactivate
64
+
65
+
2. **Set Airflow Home (optional)**:
48
66
49
67
Airflow requires a home directory, and uses ``~/airflow`` by default, but you can set a different location if you prefer. The ``AIRFLOW_HOME`` environment variable is used to inform Airflow of the desired location. This step of setting the environment variable should be done before installing Airflow so that the installation process knows where to store the necessary files.
50
68
51
69
.. code-block:: bash
52
70
53
71
export AIRFLOW_HOME=~/airflow
54
72
73
+
55
74
2. Install Airflow using the constraints file, which is determined based on the URL we pass:
0 commit comments