0

I have been trying to setup apache-airflow on my local Windows 10 machine. I am getting the following error when running airflow version, two .cfg files and missing pwd module. Trying to troubleshoot this for the last 5 days. I haven't used venv yet but would be trying to install airflow in venv. I have Python 3.8 installed

[username]@LAPTOP- MINGW64 ~
$ airflow version
C:\users\[username]\appdata\local\programs\python\python38\lib\site-packages\airflow\configuration.py:756: DeprecationWarning: You have two airflow.cfg files: C:\Users\[username]/airflow/airflow.cfg and C:\Users\[username]\airflow\airflow.cfg. 
Airflow used to look at ~/airflow/airflow.cfg, even when AIRFLOW_HOME was set to a different value. Airflow will now only read C:\Users\[username]\airflow\airflow.cfg, and you should remove the other file
  warnings.warn(
WARNING:root:OSError while attempting to symlink the latest log directory
Traceback (most recent call last):
  File "C:/Users/[username]/AppData/Local/Programs/Python/Python38/Scripts/airflow", line 26, in <module>
    from airflow.bin.cli import CLIFactory
  File "C:\users\[username]\appdata\local\programs\python\python38\lib\site-packages\airflow\bin\cli.py", line 50, in <module>
    import daemon
  File "C:\users\[username]\appdata\local\programs\python\python38\lib\site-packages\daemon\__init__.py", line 38, in <module>
    from .daemon import DaemonContext
  File "C:\users\[username]\appdata\local\programs\python\python38\lib\site-packages\daemon\daemon.py", line 18, in <module>
    import pwd
ModuleNotFoundError: No module named 'pwd'

I have also tried to setup the System environment variables like this. system env variable:
system env variable

Dharman
  • 30,962
  • 25
  • 85
  • 135
Ahmed
  • 36
  • 5

1 Answers1

1

Airflow only works in Linux-like environments (Linux/MacOS). You can install in in WSL2 (Windows Subsystem For Linux 2). You can see some instructions here if you are interested: https://github.com/apache/airflow/blob/master/BREEZE.rst#docker-in-wsl-2 - but those are instruction for contributors, not users.

Jarek Potiuk
  • 19,317
  • 2
  • 60
  • 61