Skip to content Skip to sidebar Skip to footer

Bashoperator Raising Importerror For A Lib Used In Other Pythonoperators

I have a set of tasks in my dag builder module which uses Python operator as used worldwide in Airflow. I am deploying airflow using docker on kubernetes. A task is failing with th

Solution 1:

The Operator failing is not a PythonOperator, it's a BashOperator. The most likely reason is that python in Bash is currently pointing to a different Python environment from the one running Airflow.

Be sure to specify python3 in your BashOperator, or whatever extra configuration you need to invoke Python from the command line in the same environment as your PythonOperator does.

Post a Comment for "Bashoperator Raising Importerror For A Lib Used In Other Pythonoperators"