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/05/11 07:07:42 UTC

[GitHub] [airflow] uranusjr commented on issue #15768: PythonVirtualenvOperator fails with error from pip execution: Can not perform a '--user' install.

uranusjr commented on issue #15768:
URL: https://github.com/apache/airflow/issues/15768#issuecomment-837961151


   > My proposed solution would be to prepend `PIP_USER=false` to the construction of the call to pip within `utils/python_virtualenv.py` here:
   
   I don’t think that’s right, that command is used to invoke `virtualenv`, not `pip`. And prepending won’t work because that is a Bash-specific syntax and does not work with `subproces.Popen()` (unless `shell=True` but please don’t do that).
   
   One possible fix would be to introduce an `environ` argument to `execute_in_subprocess()` so the `PIP_USER` environment variable can be removed when invoking pip.


-- 
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:
users@infra.apache.org