且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在requirements.txt文件中安装python模块时出现问题

更新时间:2022-11-07 19:09:08

如果某个包无法通过pip安装,并且出现在 requirements.txt pip的 选项以引用该软件包的可安装版本.请 看看文档中的示例 使用requirements.txt 管理所需的程序包,看看是否有帮助.

If a package cannot be installed by pip and it appears in a requirements.txt file, the entire installation fails. You may use pip's options to refer to an installable version of the package. Please take a look at the sample in the document Manage required packages with requirements.txt and see if that helps.

Include below line of code as first line in requirements.txt file and then check.

echo Pip install requirements. 

D:\home\Python()\python.exe -m pip install --upgrade -r requirements.txt 

如果您尚未执行此操作,则只是为了进一步隔离问题,您可以尝试部署 本地应用,然后看看效果如何.另外,请确保按照本文档中的说明正确设置配置 在Linux上为Azure应用服务配置Python应用

If you haven’t done this already, just to isolate the issue further you may try deploying the app locally and see how that goes. Also, kindly ensure that the configuration is set appropriately as mentioned in this document Configure your Python app for the Azure App Service on Linux and Install Python Modules on Azure App Services for a detailed steps, re-try and let us know for further investigation.