I am getting
-bash: airflow: command not found
after installing Apache Airflow. I am using Google Cloud Compute Engine and OS is Debian 9 (Stretch).
I have followed the below steps:
export AIRFLOW_HOME=~/airflow
pip install apache-airflow
In order to install Airflow you need to either downgrade pip to version 20.2. 4 pip upgrade --pip==20.2. 4 or, in case you use Pip 20.3, you need to add option --use-deprecated legacy-resolver to your pip install command. You also need database client packages (Postgres or MySQL) if you want to use those databases.
Note: Only pip installation is currently officially supported. While it is possible to install Airflow with tools like Poetry or pip-tools, they do not share the same workflow as pip - especially when it comes to constraint vs. requirements management. Installing via Poetry or pip-tools is not currently supported.
Startup AirflowCreate a new terminal ( CMD + T on Mac)and setup the AIRFLOW_HOME path again. Don't forget to activate the virtual environment if you previously setup a virtual environment. If you don't then the airflow commands will not work in the new terminal. Then start the webserver.
I have uninstalled Apache Airflow and installed it with the sudo
command (i.e., sudo pip install apache-airflow
). After that it worked fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With