![](/img/trans.png)
[英]Azure DevOps AzureFunctionApp@1 not installing python dependencies
[英]why python dependencies are not installing?
我試圖創建一個從 github-actions 到 ec2 的 ci-cd 工作流。 但工作流程的一部分不起作用。 有一部分我們可以使用 shell 文件安裝 python 依賴項。 但是訪問requirements.txt 時出現問題。 請幫幫我。
這是我的 shell 腳本:
sudo pip3 install virtualenv
cd /home/ec2-user/app/Phalguna
virtualenv environment
source environment/bin/activate
sudo pip3 freeze > requirements.txt
sudo pip3 install -r requirements.txt
這是我的錯誤: ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements.txt'
正如您在此處的第一句話中所讀: https://pip.pypa.io/en/stable/cli/pip_freeze/
“以需求格式輸出已安裝的包。”
您剛剛創建了一個沒有安裝包的新虛擬環境。 所以 pip 凍結,當然不可能 output 對你的應用有任何依賴。 您必須從您的測試環境中執行此操作,並安裝所有已安裝的軟件包,並將其與您的應用程序的 rest 一起發送。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.