(Failed) Apache Airflow Windows-10 Install

NOTE: I fought this installation a lot and fixed numerous issues, but in the end I got stuck on a C++ compilation failure in the Airflow install via pip.  So, I’m switching to installing it in a new post in an Ubuntu shell available in the Windows 10 store since I’ll be running Airflow in Linux in production anyway.  So, there is probably some helpful stuff here; but its not a full solution and I recommend against doing Airflow this way given my experiences here.

I’m relatively new to Python and have only really used it for simplistic scripts in the past; but now I’ll be using it for a new job along with Apache Airflow (which is very cool).

Anyway, I just had a terrible time installing Airflow… so I thought I’d document the issues here and a working solution on Windows 10:

  1. Install python 3.6.7 from here: https://www.python.org/downloads/release/python-367/
    • (Do not use Python 3.7; as of 2018-11-06, “pip install apache-airflow” will install apache-airflow-1.10.0, and the installer will try and use the “async” keyword, which is now a reserved word in Python 3.7, so it will fail).
  2. Make sure Python and its Scripts directory are in your path (Python’s installer may or may not do this.  If you open a new command line after the Python install and “python –version” doesn’t show 3.6.7, you need to do it.
    • Note that the scripts directory is where pip is; this is your package installer for adding modules to Python.
  3. Upgrade pip with:  python -m pip install –upgrade pip
  4. The installation command for Airflow is “pip install apache-airflow”.  But in my case, this failed a few more times due to other dependencies/issues.  So, I had to do the following before this worked:
    • Set this environment variable: “set SLUGIFY_USES_TEXT_UNIDECODE=yes”
    • Install Microsoft Visual C++ 14 build packages (this is time consuming) and upgrade the build tools in Pip.
      • pip install –upgrade setuptools
      • install the “Build Tools for Visual Studio 2017” from: https://www.visualstudio.com/downloads/#build-tools-for-visual-studio-2017
        • Once the interface opens for the installer,  install Visual C++ build tools – Build Windows desktop applications using the Microsoft C++ toolset, ATL, or MFC. I also checked the following boxes on the right:
          • Windows 10 SDK (10.0.17134.0)
          • Visual C++ tools for CMake
          • Testing tools core features – Build Tools
          • VC++ 2015.3 v14.00 (v140) toolset for desktop
          • Windows Universal CRT SDK
          • Windows 8.1 SDK
          • Installation is 2.5GB! Woah.
  5. Open a new command line so it picks up everything and then run
    • set SLUGIFY_USES_TEXT_UNIDECODE=yes
    • pip install apache-airflow
    • IT STILL DIDN’T WORK! – The error is a complex SYSTEM_THREADING related one and online docs for it seem to not have a resolution.  
      There’s probably a way to fix this; but at this point I’m going to switch to installing it in a Ubuntu shell subsystem from the Windows 10 store in a new blog post – I’ve wasted enough time on this given I’ll be running Airflow in Linux in production anyway.

1 thought on “(Failed) Apache Airflow Windows-10 Install

Leave a comment