Skip to content
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

Ensure use of python from venv on Mac and Linux #16116

Merged
merged 1 commit into from
Jul 6, 2024

Conversation

viking1304
Copy link
Contributor

@viking1304 viking1304 commented Jun 30, 2024

Description

If the user sets the full path to the Python executable in webui-user.sh, venv will be created as usual. Everything will work and look normal, but all packages will be actually installed globally.

It fixes #16113

The reason for this behavior is that in this line

"${python_cmd}" -u "${LAUNCH_SCRIPT}" "$@"

python_cmd contains the full path and will be executed as

/opt/homebrew/bin/python3.10 -u launch. py

instead of

python3.10 -u launch. py

This change ensures that the python executable from venv will be used, even if the user sets the full path. This change only affects users who use venv; it does not change anything if venv is not used.

Screenshots/videos:

Checklist:

@AUTOMATIC1111 AUTOMATIC1111 merged commit 76a19c0 into AUTOMATIC1111:dev Jul 6, 2024
3 checks passed
@viking1304 viking1304 deleted the ensure-venv-use branch July 6, 2024 17:54
@lawchingman lawchingman mentioned this pull request Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants