Skip to content

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

Merged
AUTOMATIC1111 merged 1 commit intoAUTOMATIC1111:devfrom
viking1304:ensure-venv-use
Jul 6, 2024
Merged

Ensure use of python from venv on Mac and Linux#16116
AUTOMATIC1111 merged 1 commit intoAUTOMATIC1111:devfrom
viking1304:ensure-venv-use

Conversation

@viking1304
Copy link
Copy Markdown
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
@viking1304 viking1304 deleted the ensure-venv-use branch July 6, 2024 17:54
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