-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
install-poetry fails with PIP_REQUIRE_VIRTUALENV #4089
Comments
The installer changes proposed in #4099 greatly simplify the virtualenv-related code and solve half this issue (unexplained errors/discarded information). Now we just have to determine if the installer breaking due to this setting is a bug, or if the user is responsible for unsetting it before running the installer. Thoughts, @sdispater? |
I was wrong about this -- #4099 with actually entirely solve this issue as Poetry will no longer invoke |
This change refactors virtual environment creation and introduces a new wrapper to handle command execution etc. If venv module is not available, in cases like that of the ubuntu distribution where the module is not part of the default python install, the virtualenv package is used by fetching the appropriate zipapp for the package for the python runtime. Resolves: python-poetry#4089 Resolves: python-poetry#4093
This change refactors virtual environment creation and introduces a new wrapper to handle command execution etc. If venv module is not available, in cases like that of the ubuntu distribution where the module is not part of the default python install, the virtualenv package is used by fetching the appropriate zipapp for the package for the python runtime. Resolves: python-poetry#4089 Resolves: python-poetry#4093
This change refactors virtual environment creation and introduces a new wrapper to handle command execution etc. If venv module is not available, in cases like that of the ubuntu distribution where the module is not part of the default python install, the virtualenv package is used by fetching the appropriate zipapp for the package for the python runtime. Resolves: python-poetry#4089 Resolves: python-poetry#4093
* installer: improve error handling and logging Co-authored-by: Bjorn Neergaard <bjorn@neersighted.com> * installer: default to using in-built venv module This change refactors virtual environment creation and introduces a new wrapper to handle command execution etc. If venv module is not available, in cases like that of the ubuntu distribution where the module is not part of the default python install, the virtualenv package is used by fetching the appropriate zipapp for the package for the python runtime. Resolves: #4089 Resolves: #4093 * ci/installer: upload failure logs * installer: preserve existing environment on failure This change ensures that if creation of a new environment fails, any previously existing environment is restored. Co-authored-by: Bjorn Neergaard <bjorn@neersighted.com>
* installer: improve error handling and logging Co-authored-by: Bjorn Neergaard <bjorn@neersighted.com> * installer: default to using in-built venv module This change refactors virtual environment creation and introduces a new wrapper to handle command execution etc. If venv module is not available, in cases like that of the ubuntu distribution where the module is not part of the default python install, the virtualenv package is used by fetching the appropriate zipapp for the package for the python runtime. Resolves: python-poetry#4089 Resolves: python-poetry#4093 * ci/installer: upload failure logs * installer: preserve existing environment on failure This change ensures that if creation of a new environment fails, any previously existing environment is restored. Co-authored-by: Bjorn Neergaard <bjorn@neersighted.com>
* installer: improve error handling and logging Co-authored-by: Bjorn Neergaard <bjorn@neersighted.com> * installer: default to using in-built venv module This change refactors virtual environment creation and introduces a new wrapper to handle command execution etc. If venv module is not available, in cases like that of the ubuntu distribution where the module is not part of the default python install, the virtualenv package is used by fetching the appropriate zipapp for the package for the python runtime. Resolves: python-poetry#4089 Resolves: python-poetry#4093 * ci/installer: upload failure logs * installer: preserve existing environment on failure This change ensures that if creation of a new environment fails, any previously existing environment is restored. Co-authored-by: Bjorn Neergaard <bjorn@neersighted.com>
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Because
install-poetry.py
does not check the exit status ofpip
when bootstrapping the temporaryvirtualenv
module, users are confronted with an odd error when they have$PIP_REQUIRE_VIRTUALENV
set in their environment.Output looks something like the following:
This can easily be corrected by invoking the script again with
PIP_REQUIRE_VIRTUALENV=
to 'reset' the environmental variable.For some background:
Pip provides this opt-in so that users can ensure they don't accidentally clutter or break their system installation of Python. Normally when this feature blocks execution of a command, it is called out to the user like this:
Because pip is being invoked by
install-poetry.py
without checking exit status or output, this information is lost.I would suggest explicitly resetting
PIP_REQUIRE_VIRTUALENV
in the installer script unconditionally to ensure that this interaction doesn't cause the failure above.The text was updated successfully, but these errors were encountered: