You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/11/01 12:00:33 UTC

[GitHub] [airflow] potiuk commented on a diff in pull request #27403: Add classic examples for Python Operators

potiuk commented on code in PR #27403:
URL: https://github.com/apache/airflow/pull/27403#discussion_r1010351648


##########
docs/apache-airflow/howto/operator/python.rst:
##########
@@ -109,19 +119,37 @@ ExternalPythonOperator
 ======================
 
 The ``ExternalPythonOperator`` can help you to run some of your tasks with a different set of Python
-libraries than other tasks (and than the main Airflow environment).
+libraries than other tasks (and than the main Airflow environment). This might be a virtual environment
+or any installation of Python that is preinstalled and available in the environment where Airflow
+task is running. The operator takes Python binary as ``python`` parameter. Note, that even in case of
+virtual environment, the ``python`` path should point to the python binary inside the virtual environment
+(usually in ``bin`` subdirectory of the virtual environment). Contrary to regular use of virtual
+environment, there is no need for ``activation`` of the environment. Merely using ``python`` binary
+automatically activates it. In both examples below ``PATH_TO_PYTHON_BINARY`` is such a path, pointing
+to the executable Python binary.
 
 Use the :class:`~airflow.operators.python.ExternalPythonOperator` to execute Python callables inside a
-pre-defined virtual environment. The virtualenv should be preinstalled in the environment where
-Python is run and in case ``dill`` is used, it has to be preinstalled in the virtualenv (the same
+pre-defined environment. The virtualenv (which is should be preinstalled in the environment where

Review Comment:
   > Maybe, for ExternalPythonOperertor, points to the doc for extending/customizing docker images so people can prepare their virtualenv?
   
   Good idea. There is a PR opened to update the docs which I am reviewing https://github.com/apache/airflow/pull/27406 and it should be added there.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org