Skip to content

Commit 55903af

Browse files
committed
#46316 Issue: Update start.rst
1 parent 9ec0076 commit 55903af

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

docs/apache-airflow/start.rst

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ This quick start guide will help you bootstrap an Airflow standalone instance on
2424

2525
.. note::
2626

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.
2828

2929
Only ``pip`` installation is currently officially supported.
3030

@@ -44,14 +44,33 @@ This quick start guide will help you bootstrap an Airflow standalone instance on
4444
The installation of Airflow is straightforward if you follow the instructions below. Airflow uses
4545
constraint files to enable reproducible installation, so using ``pip`` and constraint files is recommended.
4646

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)**:
4866

4967
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.
5068

5169
.. code-block:: bash
5270
5371
export AIRFLOW_HOME=~/airflow
5472
73+
5574
2. Install Airflow using the constraints file, which is determined based on the URL we pass:
5675

5776
.. code-block:: bash

0 commit comments

Comments
 (0)