New Airflow is made on its own(airflow's default directory) other than the airflow that i installed in a specific directory. What is happening?

流过昼夜 提交于 2020-05-17 08:49:15

问题


I've installed airflow in a virtual env so prior to installing it, I specified a directory in which the install will occur. Installation is done everything works fine without any issues(its the same terminal that i used for installation) but if i open a new terminal, activate the env and run any airflow command what happens is,a new airflow get generated out of no where in its default airflow location so the airflow commands no longer access my airflow and rather access this new one. Even re-installation didn't help. How is this even possible that at the same time, it works in one terminal but not in other! Thank you in advance!


回答1:


That is because when you open a new terminal and activate the Virtual Env, airflow still does not know where to look for configs until the AIRFLOW_HOME environment variable is set up.

Most likely in your second terminal, you don't have AIRFLOW_HOME environment variable set, hence airflow uses the default AIRFLOW_HOME i.e $HOME/airflow.

You should set the AIRFLOW_HOME in your .bashrc or .zshrc file so the environment variables are preserved when you use new terminal.



来源:https://stackoverflow.com/questions/61681213/new-airflow-is-made-on-its-ownairflows-default-directory-other-than-the-airfl

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!