在requirements.txt文件中安装python模块时出现问题 [英] Issues installing python modules in requirements.txt file

查看:244
本文介绍了在requirements.txt文件中安装python模块时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在为正在开发的Webapp安装必要的python软件包时遇到麻烦.我正在通过自定义部署脚本升级pip

I have been having trouble installing the necessary python packages for a Webapp i am working on. I am upgrading pip via a custom deployment script

pip install --user --upgrade pip
pip install --user --upgrade pip

推荐答案

如果某个包无法通过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.


这篇关于在requirements.txt文件中安装python模块时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆