Justin Coulibaly
Justin Coulibaly

Reputation: 229

How to install and run apache-airflow on windows without problem

I tried to install Apache Airflow 2.2.4 on windows 10. When I finish and run airflow here are the errors it gives me.

Traceback (most recent call last):
  File "/home/david/.local/bin/airflow", line 5, in <module>
    from airflow.__main__ import main
  File "/home/david/.local/lib/python3.6/site-packages/airflow/__init__.py", line 34, in <module>
    from airflow import settings
  File "/home/david/.local/lib/python3.6/site-packages/airflow/settings.py", line 35, in <module>
    from airflow.configuration import AIRFLOW_HOME, WEBSERVER_CONFIG, conf  # NOQA F401
  File "/home/david/.local/lib/python3.6/site-packages/airflow/configuration.py", line 1127, in <module>
    conf = initialize_config()
  File "/home/david/.local/lib/python3.6/site-packages/airflow/configuration.py", line 890, in initialize_config
    shutil.copy(_default_config_file_path('default_webserver_config.py'), WEBSERVER_CONFIG)
  File "/usr/lib/python3.6/shutil.py", line 245, in copy
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/lib/python3.6/shutil.py", line 121, in copyfile
    with open(dst, 'wb') as fdst:
PermissionError: [Errno 13] Permission denied: '/webserver_config.py'

Upvotes: 0

Views: 2465

Answers (1)

HelloWorld
HelloWorld

Reputation: 107

Following steps resolved similar issue for me, but not sure what resolved it
1) Makes sure your wsl version is 2. (Restart PC if you change wsl version)
2)Enable Windows subsystem for Linux and Virtual Machine platform. (Restart PC)

After this, I followed following tutorial: https://towardsdatascience.com/run-apache-airflow-on-windows-10-without-docker-3c5754bb98b4
If u follow this, u will not be installing airflow ver 1.10.12 but apache airflow 2.2.4, and instead of "airflow initdb" use "airflow db init" command.
Also, before running command "airflow db init" create an user, command for this (optional but I suggest run this command):

airflow users create --username admin --password admin --firstname <firstname> --lastname <lastname> --role Admin --email [email protected]

Upvotes: 1

Related Questions