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


##########
airflow/example_dags/example_python_operator.py:
##########
@@ -32,6 +36,20 @@
 
 log = logging.getLogger(__name__)
 
+PYTHON = sys.executable
+
+BASE_DIR = tempfile.gettempdir()
+EXTERNAL_PYTHON_ENV = Path(BASE_DIR, "venv-for-system-tests")
+
+# [START howto_initial_operator_external_python]
+
+EXTERNAL_PYTHON_PATH = EXTERNAL_PYTHON_ENV / "bin" / "python"
+
+# [END howto_initial_operator_external_python]
+
+if not EXTERNAL_PYTHON_PATH.exists():
+    venv.create(EXTERNAL_PYTHON_ENV)

Review Comment:
   Good point
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to