mik-laj commented on pull request #10373:
URL: https://github.com/apache/airflow/pull/10373#issuecomment-675488663
```python
start_python_job = DataflowCreatePythonJobOperator(
task_id="start-python-job",
py_file=GCS_PYTHON,
py_options=[],
job_name='{{task.task_id}}',
options={
'output': GCS_OUTPUT,
},
py_requirements=None,
py_interpreter='python3',
py_system_site_packages=False,
location='europe-west3'
)
```
This should not create a virtual environment since py_requirements is set to
None.
```python
start_python_job = DataflowCreatePythonJobOperator(
task_id="start-python-job",
py_file=GCS_PYTHON,
py_options=[],
job_name='{{task.task_id}}',
options={
'output': GCS_OUTPUT,
},
py_requirements=[], # Enable virtuall environment
py_interpreter='python3',
py_system_site_packages=True, # set to True
location='europe-west3'
)
```
This should not create a virtual environment since py_requirements is set to
``[]`` and ``py_system_site_packages`` is set to True, so we can use
``apache-beam`` from system site-packages?
Can you confirm it is behaving this way now?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]