Skip to content

Commit e4a60ca

Browse files
Srabastipotiuk
andauthored
Airflow documentation updates for Windows WSL2 installation (#57027)
* Update start.rst for Windows WSL2 installation Airflow Installation documentation updates for Windows using WSL2 * Update start.rst Fixed typo in WSL * Update start.rst with formatting changes Formatting changes for Airflows Windows WSL2 installation * Update start.rst to add line after ..code-block:: bash Update start.rst to add line after ..code-block:: bash * Fix trailing whitespace in start.rst * Update airflow-core/docs/start.rst Co-authored-by: Jarek Potiuk <[email protected]> * Update airflow-core/docs/start.rst Co-authored-by: Jarek Potiuk <[email protected]> * Update airflow-core/docs/start.rst Co-authored-by: Jarek Potiuk <[email protected]> * Fix trailing whitespace, reshuffling content, adding uv in start.rst * Incorporating review comments for performance benefits of uv over pip in start.rst * Fix RST syntax errors: add :: to code-block and fix path separators * Fix typos in link --------- Co-authored-by: Jarek Potiuk <[email protected]>
1 parent 4408d68 commit e4a60ca

File tree

1 file changed

+37
-3
lines changed

1 file changed

+37
-3
lines changed

airflow-core/docs/start.rst

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ This quick start guide will help you bootstrap an Airflow standalone instance on
2626

2727
Successful installation requires a Python 3 environment. Starting with Airflow 3.1.0, Airflow supports Python 3.10, 3.11, 3.12, 3.13.
2828

29-
Officially supported installation methods is with``pip`.
29+
Officially supported installation methods is with``pip`` or ``uv``.
3030

31-
Run ``pip install apache-airflow[EXTRAS]==AIRFLOW_VERSION --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-AIRFLOW_VERSION/constraints-PYTHON_VERSION.txt"``, for example ``pip install "apache-airflow[celery]==3.0.0" --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-3.0.0/constraints-3.10.txt"`` to install Airflow in a reproducible way.
31+
Run ``pip install apache-airflow[EXTRAS]==AIRFLOW_VERSION --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-AIRFLOW_VERSION/constraints-PYTHON_VERSION.txt"``, for example ``pip install "apache-airflow[celery]==3.0.0" --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-3.0.0/constraints-3.10.txt"`` to install Airflow in a reproducible way. You can also use - much faster - ``uv`` - by adding ``uv`` before the command.
3232

3333

3434

@@ -43,6 +43,12 @@ This quick start guide will help you bootstrap an Airflow standalone instance on
4343
This guide will help you quickly set up Apache Airflow using ``uv``, a fast and modern tool for managing Python environments and dependencies. ``uv`` makes the installation process easy and provides a
4444
smooth setup experience.
4545

46+
If you are on Windows, you have to use WSL2 (Linux environment for Windows).
47+
48+
.. code-block:: bash
49+
50+
wsl --install
51+
4652
1. **Set Airflow Home (optional)**:
4753

4854
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.
@@ -51,7 +57,7 @@ This quick start guide will help you bootstrap an Airflow standalone instance on
5157
5258
export AIRFLOW_HOME=~/airflow
5359
54-
2. Install Airflow Using uv:
60+
2. Install Airflow in a virtual environment using ``uv`` since it is faster alternative that creates the ``venv`` automatically implicitly for you. It is efficient alternative to using ``pip`` and ``venv``.
5561

5662
.. rst-class:: centered
5763

@@ -61,6 +67,34 @@ This quick start guide will help you bootstrap an Airflow standalone instance on
6167
For creating virtual environment with ``uv``, refer to the documentation here:
6268
`Creating and Maintaining Local virtual environment with uv <https://github.com/apache/airflow/blob/main/contributing-docs/07_local_virtualenv.rst#creating-and-maintaining-local-virtualenv-with-uv-recommended>`_
6369

70+
For installation using ``pip`` and ``venv``, carry out following steps:
71+
.. code-block:: bash
72+
73+
# For Windows after WSL2 install, restart computer, then in WSL Ubuntu terminal
74+
sudo apt update
75+
sudo apt install python3-pip python3-venv
76+
77+
bash # Go to Linux home directory (not Windows mount)
78+
cd ~
79+
80+
# Create airflow directory
81+
mkdir -p ~/airflow
82+
cd ~airflow
83+
84+
# Create virtual environment
85+
python3 -m venv airflow_venv
86+
87+
# Activate
88+
source airflow_venv/bin/activate
89+
90+
# Upgrade pip
91+
pip install --upgrade pip
92+
93+
# Install Airflow with correct Python version constraints
94+
pip install apache-airflow[celery]==3.1.0 --constraint https://raw.githubusercontent.com/apache/airflow/constraints-3.1.0/constraints-3.12.txt
95+
96+
# Verify installation
97+
airflow version
6498
6599
3. Install Airflow using the constraints file, which is determined based on the URL we pass:
66100

0 commit comments

Comments
 (0)