【发布时间】:2019-08-03 01:19:40
【问题描述】:
我创建了一个也在本地执行的 Python Azure HttpTrigger 函数。它在本地运行良好,但是当我在 azure 上部署 Azure HttpTrigger 函数时,出现以下错误:-
There was an error restoring dependencies. ERROR: cannot install pyodbc-4.0.25 dependency: binary dependencies without wheels are not supported.
Use the --build-native-deps option to automatically build and configure the dependencies using a Docker container. More information at https://aka.ms/func-python-publish
我在requirement.txt file 中添加了 Pyodbc 包。当 python azure 函数部署在 azure 上时,pyodbc 安装在本地 python 路径而不是 .env 路径中。
我已经选择了python解释器\.env\Scripts\python.ext,但是pyodbc包安装在本地python路径上。
我无法理解如何解决上述问题?如果有人知道解决方案,请告诉我。我想在 azure funcions 上安装包。
【问题讨论】:
-
尝试在 Github 中发布 Azure 功能 - github.com/azure/azure-functions/issues
-
请参考这个issue。
-
@GeorgeChen 我已经尝试过了,但是没有用。是任何其他解决方案。
-
@GeorgeChen 每当我在 python azure 函数中使用外部包时,我就遇到了部署错误。
标签: python azure azure-functions