I seem to be doing sth. wrong.
https://pythonhosted.org/airflow/start.html
$ export AIRFLOW_HOME=~/airflow
$ pip install apache-airflow
Requirement already satisfied
$ airflow initdb
airflow: Command not found
python --version
Python 2.7.10
It's weird - the installation seemed to have worked fine (with some warnings - nothing serious) saying: airflow, flask, etc. successfully installed. But even after restarting the PC (Ubuntu 15.10) airflow seems not to be a command.
I tried both pip install apache-airflow and pip3 install apache airflow and both had issues because it installed everything in ~/.local/bin/
If you get the error that you cannot run airflow, you will find it in
~/.local/bin/airflow
. Then you can add the alias to your .bashrc:alias airflow='~/.local/bin/airflow'
then runbash
and you will be able to run airflow.Then when you try to run the webserver with either the python2 or python3 version it will throw an error because it cannot find gunicorn, and you can fix that by adding ~/.local/bin to the PATH:
export PATH=$PATH:~/.local/bin
I have macOs Mojave. Airflow comes with default sqlite db which doesnt allow parallel processing. Installation is difficult.
Then create a virtual env for python3.7. In venv type :
pip install "apache-airflow[celery, crypto, postgres, rabbitmq, redis]==1.10.6"
Airflow will be generally installed at
‘/Library/Frameworks/Python.framework/Versions/3.7/bin/airflow’
add this path to your path variable as shown here Link
now type following in you virtual env that you created above for airflow.
airflow initdb
If this works you have installed airflow successfully.
Here are the steps I followed to install Airflow:
Set the airflow home in ~/.bashrc
Install from pypi using pip
initialising the metadata DB
starting the webserver
open browser and go to localhost:8080 to view and use UI
The solution the worked for was to create an environment, install airflow and then was able to run it.
-> Install virtualenv:
$pip install virtualenv
-> Create environment:
$python -m venv myvenv
-> Activate environment:
$source myenv/bin/activate
-> Install airflow :
(myenv)$pip install airflow
with postgres:pip install airflow[postgres]
->Start the server:
(myenv)$airflow webserver -p 8080
This seems like the path to airflow is not in your PATH. does this happen with other python packages?
try:
this is the default path for airflow and should make it work
Your steps look correct, if you haven't omitted anything else. But you could try Python virtualenv and virtualenvwrapper with following steps to have an isolated airflow environment.