63

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

Andrzej Sydor
  • 1,373
  • 4
  • 13
  • 28
Md Sirajus Salayhin
  • 4,974
  • 5
  • 37
  • 46

8 Answers8

112

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.

totooooo
  • 1,050
  • 1
  • 12
  • 32
kaxil
  • 17,706
  • 2
  • 59
  • 78
31

If you are installing using sudo run one of these commands:

sudo AIRFLOW_GPL_UNIDECODE=yes pip3 install apache-airflow

OR

sudo SLUGIFY_USES_TEXT_UNIDECODE=yes pip3 install apache-airflow

NOTE: If pip3 (python3) does not work for you, try pip command. The pip command can be pointing to python2 or python3 installation depending on your system. Verify this by running pip --version.

Gabriel Avellaneda
  • 742
  • 1
  • 7
  • 14
  • 2
    Thanks a lot! The first command worked. (Note: Normal pip3 install apache-airflow was not working for me) – drk Mar 21 '19 at 14:11
  • 1
    This worked for me (not the accepted answer) with pip (not pip3) – JonyD Apr 02 '19 at 14:21
10

Windows users can use the command below before installing apache-airflow:

$ set AIRFLOW_GPL_UNIDECODE=yes

then

$ pip install apache-airflow
currarpickt
  • 2,290
  • 4
  • 24
  • 39
Vivek Gour
  • 101
  • 1
  • 5
3

Below command should install apache-airflow and lets you pull changes into PyCharm for building DAGs and coding for Airflow.

SLUGIFY_USES_TEXT_UNIDECODE=yes

pip install apache-airflow

vmorusu
  • 936
  • 1
  • 15
  • 32
3

In case you are installing the airflow on Windows and through Python terminal then you need to write this:

Set SLUGIFY_USES_TEXT_UNIDECODE=yes

pip install apache-airflow[postgres]

It worked with me after I struggled with trying many other options. Hope this will work with you too.

Community
  • 1
  • 1
Vishal
  • 31
  • 1
2

Also, if you are installing using sudo you can use:

export AIRFLOW_GPL_UNIDECODE='yes'
sudo -E pip3 install apache-airflow

(or use SLUGIFY_USES_TEXT_UNIDECODE)

André C. Andersen
  • 8,955
  • 3
  • 53
  • 79
1

Run the following command in your python terminal: SLUGIFY_USES_TEXT_UNIDECODE=yes pip install apache-airflow==1.10.0

d_-
  • 1,391
  • 2
  • 19
  • 37
1

Use below command to install apache-airflow

sudo SLUGIFY_USES_TEXT_UNIDECODE=yes \
pip install apache-airflow[async,devel,celery,crypto,druid,gcp_api,jdbc,hdfs,hive,kerberos,ldap,password,postgres,qds,rabbitmq,s3,samba,slack]
Nelson G.
  • 5,145
  • 4
  • 43
  • 54