我正在使用zip部署方法在Azure云中的Linux上的Linux上创建python Web应用程序,该部署由自定义deploy.sh完成,而zip包上载deploy.sh由自动运行,并且它不会创建提到的虚拟环境在deploy.sh和所需的依赖项中,但是当我通过ssh手动运行它时,它工作正常。有人对此有任何线索吗? 自定义deploy.sh命令如下,
export PIP3="pip3"
export ANTENV="antenv3.6"
export PYTHON3="/usr/local/bin/python3"
echo "Found requirements.txt"
echo "Python Virtual Environment: $ANTENV"
echo "Python Version: $PYTHON3"
#2a. Setup virtual Environment
echo "Create virtual environment"
$PYTHON3 -m venv $ANTENV --copies
#2b. Activate virtual environment
echo "Activate virtual environment"
. $ANTENV/bin/activate
#2c. Install dependencies
#sleep 120
#2d. Install dependencies
echo "Installing libraries specified in requirements.txt"
$PIP3 install -r requirements.txt