2

How to install Airflow on Windows 7? getting below error while installing it using pip install apache-airflow :

    ---------------------------------------- Command "c:\users\shrgupta5\appdata\local\programs\python\python36-32\python.exe
-u -c "import setuptools, tokenize;__file__='C:\\Users\\SHRGUP~1\\AppData\\Loca l\\Temp\\pip-build-_yptw7sa\\psutil\\setup.py';f=getattr(tokenize, 'open', open) (__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __fi le__, 'exec'))" install
--record C:\Users\SHRGUP~1\AppData\Local\Temp\pip-_cwm0n u7-record\install-record.txt --single-version-externally-managed
--compile" fail ed with error code 1 in C:\Users\SHRGUP~1\AppData\Local\Temp\pip-build-_yptw7sa\ psutil\
Shrashti
  • 140
  • 5
  • 13
  • 2
    maybe describe what attempts you have done to install it? – Patrick Apr 17 '18 at 11:34
  • Possible duplicate of [How to run Airflow on Windows](https://stackoverflow.com/questions/32378494/how-to-run-airflow-on-windows) – tobi6 Apr 17 '18 at 12:24

4 Answers4

3

I wouldn't bother trying to install Airflow on windows, even after you install it successfully you cannot run the airflow script due to a dependency on the unix-only module pwd

Simon D
  • 5,730
  • 2
  • 17
  • 31
2

You can run Airflow on Windows by using the Docker setup from puckel https://github.com/puckel/docker-airflow.

  • Use VirtualBox and Docker Toolbox(legacy) and setup a docker-machine on your Windows computer (docker-machine create -d virtualbox --virtualbox-cpu-count "2" --virtualbox-memory "2048" default)
  • make sure to fork puckels git repo underneath c:/Users/yourusername/documents otherwise mounting of DAGS won't work
  • You should now be able to spin up Airflow e.g. by using the celery-executor setup with docker compose -f docker-compose-CeleryExecutor.yml up -d

I have setup a environment where I develop the DAGs on Windows, test them within the dockercontainer and then push the Dockerimage to Linux to production. I have added a more detailed tutorial here.

hmrc87
  • 352
  • 1
  • 4
  • 12
0

Airflow cannot be installed on Windows within the standard command prompt.

You need to use bash and afterwards change the config:

How to run Airflow on Windows

tobi6
  • 8,033
  • 6
  • 26
  • 41
0

Download the source of airflow from pypi: https://pypi.org/project/airflow/#files

Unzip and edit setup.cfg, then go to the install_requires section and change the version of psutil with the following: 'psutil>=5.4.7',

Finally, run python setup.py install in the source directory

antogerva
  • 549
  • 1
  • 9
  • 22