INSTALLING.md
This section outlines a recommended approach for setting up a local development environment for Apache Airflow on macOS and Linux, primarily using PyEnv for Python version management.
⚠️ Avoid using either system-installed Python or Python from Homebrew, as these versions are often labeled
--externally-managedresulting in restricted dependency installation.
You can use other ways to install Python and airflow. Airflow development setup requires uv and if you want to setup environment for development, uv is the only supported local development environment setup, because we are using uv workspace extensively. See local virtualenv setup in contributing docs for details.
If you are just installing airflow to run it locally, You can use other ways to set up your Python and virtualenv: uv is one of the options (refer to uv documentation), but you can also use more traditional tools - for example pyenv. Note that it is recommended to install airflow with constraints - at least initially - because this way you can reproducibly install airflow. See Installation from PyPI for more details.
brew install pyenv
(Note: Homebrew is the recommended method on macOS. For Linux, you can typically install pyenv using the pyenv-installer script as detailed in the official documentation: https://github.com/pyenv/pyenv#installation.)
pyenv install 3.11.9
pyenv global 3.11.9
python --version
python -m venv airflow_venv
source airflow_venv/bin/activate
pip install apache-airflow==3.0.0 --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-3.0.0/constraints-3.11.txt"
Note that installing with constraints - at least initially - is recommended for reproducible installation. It might sometimes happen that 3rd-party distributions are released and their latest versions break airflow. Using constraints makes the installation reproducible with versions of dependencies that were "frozen" at the time of releasing airflow. Note you have to specify both - airflow version and Python version you are using.
You can also specify additional extras - when you want to install airflow with additional providers:
pip install apache-airflow[amazon,google]==3.0.0 --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-3.0.0/constraints-3.11.txt"
export AIRFLOW_HOME=~/airflow
airflow standalone
http://localhost:8080