浏览代码

Merge pull request #16116 from viking1304/ensure-venv-use

Ensure use of python from venv on Mac and Linux
AUTOMATIC1111 1 年之前
父节点
当前提交
76a19c089a
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      webui.sh

+ 2 - 0
webui.sh

@@ -217,6 +217,8 @@ then
     if [[ -f "${venv_dir}"/bin/activate ]]
     if [[ -f "${venv_dir}"/bin/activate ]]
     then
     then
         source "${venv_dir}"/bin/activate
         source "${venv_dir}"/bin/activate
+        # ensure use of python from venv
+        python_cmd="${venv_dir}"/bin/python
     else
     else
         printf "\n%s\n" "${delimiter}"
         printf "\n%s\n" "${delimiter}"
         printf "\e[1m\e[31mERROR: Cannot activate python venv, aborting...\e[0m"
         printf "\e[1m\e[31mERROR: Cannot activate python venv, aborting...\e[0m"