Shrashti
Shrashti

Reputation: 150

Airflow installation issue on Windows 7

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\

Upvotes: 2

Views: 4290

Answers (4)

antogerva
antogerva

Reputation: 559

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

Upvotes: 0

hmrc87
hmrc87

Reputation: 354

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.

Upvotes: 2

Simon D
Simon D

Reputation: 6279

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

Upvotes: 3

tobi6
tobi6

Reputation: 8239

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

Upvotes: 0

Related Questions