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 2021/08/24 10:41:04 UTC

[GitHub] [airflow] potiuk commented on issue #17804: Webserver fail to start with virtualenv: No such file or directory: 'gunicorn': 'gunicorn'

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


   I think this is a reasonable assumption to have  `virtualenv/bin` on the path when you installed airflow (or anything there). 
   
   This happens when you source `activate` script as part of "activation" of the virtualenv and it is described in https://docs.python.org/3/library/venv.html :
   
   > Once a virtual environment has been created, it can be “activated” using a script in the virtual environment’s binary directory. The invocation of the script is platform-specific (<venv> must be replaced by the path of the directory containing the virtual environment):
   
   also there is an alternative method of "activation" of the virtualenv - which is precilsely about prepending the `bin` directory of the venv to your PATH::
   
   > You don’t specifically need to activate an environment; activation just prepends the virtual environment’s binary directory to your path, so that “python” invokes the virtual environment’s Python interpreter and you can run installed scripts without having to use their full path. However, all scripts installed in a virtual environment should be runnable without activating it, and run with the virtual environment’s Python automatically.
   
   I think what **might**  not work if you run airlfow command after installing it in venv but without `activating` it. But I think expecting venv to be activated and gunicorn to be on the path is reasonable. Unless some people will express different opnion (and propose a solution) I consider that as `won't fix`
   
   


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