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/07/01 17:47:16 UTC

[GitHub] [airflow] potiuk commented on issue #24783: Check if virtualenv is installed fails

potiuk commented on issue #24783:
URL: https://github.com/apache/airflow/issues/24783#issuecomment-1172578717

   Yeah good point but I think the root cause is different here. The inconsistency here might come not becaue virtualenv is not reachable via importlib, but because the entrypoint script of the it is not on the PATH (i.e. `bin` of the virtualenv you are in is not added to your PATH).   
   
   This indeed might happen, but I think the importlib is not the best way (and most importantly it's not correct way). 
   
   If you look at how we are running virtualenv we are doing it via `python -m virtualenv` command - so this is externally launched python interpreted launching virtualenv module. So the current "which" is indeed not correct but running `python -m virtualenv --version` command is actually the best way of checking if virtualenv is installed in the way that will not fail the actual operator's execution.


-- 
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