Azure管道因依赖性冲突而失败
我创建了一个Azure功能,并且正在尝试构建Azure管道。在安装应用程序依赖项时,管道失败了,并带有以下错误。
ERROR: Cannot install -r requirements.txt (line 8) and azure-storage-blob==2.1.0 because these package versions have conflicting dependencies.
The conflict is caused by:
The user requested azure-storage-blob==2.1.0
azure-storage-file-datalake 12.7.0 depends on azure-storage-blob<13.0.0 and >=12.12.0
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict.
以下是安装依赖项中的代码。
python -m venv worker_venv
source worker_venv/bin/activate
pip install setuptools
pip install -r requirements.txt
在我的需求中。txt文件,azure-storage-blob版本为2.1.0。我是否应该在unignts.txt文件中删除版本部分并尝试运行管道。还有其他方法可以解决此问题。
谢谢。
I have created an Azure function and I am trying to build a Azure pipeline. The pipeline fails at install application dependencies with the below error.
ERROR: Cannot install -r requirements.txt (line 8) and azure-storage-blob==2.1.0 because these package versions have conflicting dependencies.
The conflict is caused by:
The user requested azure-storage-blob==2.1.0
azure-storage-file-datalake 12.7.0 depends on azure-storage-blob<13.0.0 and >=12.12.0
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict.
Below is the code in the install dependencies.
python -m venv worker_venv
source worker_venv/bin/activate
pip install setuptools
pip install -r requirements.txt
In my requirements.txt file the azure-storage-blob version is 2.1.0. Should I remove the version part in the requirements.txt file and trying running the pipeline. Is there any other way to fix this issue.
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我刚刚删除了unignts.txt文件中的版本,并且成功。
I just removed the version in the requirements.txt file and it was successful.
是的,当然,您还有其他方法可以解决此问题。但是,您需要确保代码向后兼容,如果您的代码必须基于Azure-Storage-Blob版本2.1.0,则不能使用Azure-Storage-File-Datalake版本12.7.0。
如果您的代码与“ Azure-Storage-blob&lt; 13.0.0”和“&gt; = 12.12.0'兼容,则可以在unignts.txt文件中指定此范围内的任何版本。
例如,您可以执行此操作:
要求.txt
现在您的直接删除版本是有效的,因为当前最新版本的Azure-Storage-Blob为12.12.0,可以满足Azure-Stareage-File-Datalake 12.7.0的依赖性要求:
https://pypi.org/project/azure-stroge-storage-storage-storage-stoorce-lobbob/12.12.12 #历史
.0 / 在不久的将来有版本冲突。因为如果未指定版本号,则默认情况下,PIP工具将安装最新版本。如果将来最新版本的Azure-Storage-Blob大于或等于13.0.0,则您将再次遇到错误。
Yes, of course you have other way to fix this issue. But you need to make sure your code is backward compatible, if your code must be based on azure-storage-blob version 2.1.0, then you can't use azure-storage-file-datalake version 12.7.0.
If your code is compatible with 'azure-storage-blob<13.0.0 and >=12.12.0', then you can specify any version within this range in the requirements.txt file.
For example, you can do this:
requirements.txt
Now your direct remove version is valid because the current latest version of azure-storage-blob is 12.12.0, which can meet the dependency requirements of azure-storage-file-datalake 12.7.0:
https://pypi.org/project/azure-storage-blob/12.12.0/#history
But if you use the 12.7.0 version of azure-storage-file-datalake, you will still have version conflicts in the near future. Because if you do not specify the version number, the pip tool will install the latest version by default. If the latest version of azure-storage-blob is greater than or equal to 13.0.0 in the future, you will encounter an error again.