Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error while install airflow: By default one of Airflow's dependencies installs a GPL

Tags:

airflow

Getting the following error after running pip install airflow[postgres] command:

> raise RuntimeError("By default one of Airflow's dependencies installs > a GPL " >  > RuntimeError: By default one of Airflow's dependencies  installs a GPL > dependency (unidecode). To avoid this dependency set > SLUGIFY_USES_TEXT_UNIDECODE=yes in your environment when you install > or upgrade Airflow. To force installing the GPL version set > AIRFLOW_GPL_UNIDECODE 

I am trying to install in Debian 9

like image 830
Md Sirajus Salayhin Avatar asked Sep 06 '18 11:09

Md Sirajus Salayhin


People also ask

Can you pip install Airflow?

Installing via Poetry or pip-tools is not currently supported. If you wish to install airflow using those tools you should use the constraints and convert them to appropriate format and workflow that your tool requires.

How do I install an Airflow package in Python?

You can do it in one of those ways: add your modules to one of the folders that Airflow automatically adds to PYTHONPATH. add extra folders where you keep your code to PYTHONPATH. package your code into a Python package and install it together with Airflow.

How do I install a specific version of 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.


1 Answers

Try the following:

export AIRFLOW_GPL_UNIDECODE=yes 

OR

export SLUGIFY_USES_TEXT_UNIDECODE=yes 

Using export makes the environment variable available to all the subprocesses.

Also, make sure you are using pip install apache-airflow[postgres] and not pip install airflow[postgres]

Which should you use: if using AIRFLOW_GPL_UNIDECODE, airflow will install a dependency that is under GPL license, which means you won't be able to distribute your resulting application commercially. If that's a problem for you, go for SLUGIFY_USES_TEXT_UNIDECODE.

like image 91
kaxil Avatar answered Sep 22 '22 03:09

kaxil