python-3.x - 将 Azure Functions 部署到 Azure 时出现 bcrypt 错误
问题描述
我开发了一个 Azure 函数,它使用 Python 3.6.8 将数据从 SFTP 摄取到 Azure SQL 数据库/数据仓库。该代码内置于 VS 代码中,并且在我的机器上本地运行良好。当我尝试部署到功能应用程序时,出现以下错误 -
恢复依赖项时出错。错误:无法安装 bcrypt-3.1.6 依赖项:不支持没有轮子的二进制依赖项。使用 Docker 容器使用 --build-ne 依赖项。更多信息,请访问https://aka.ms/func-python-publish
这是日志:
pip download --no-deps --only-binary :all: --platform manylinux1_x86_64 --python-version 36 --implementation cp --abi cp36m --dest ..\AppData\Local
pip download --no-deps --only-binary :all: --platform manylinux1_x86_64 --python-version 36 --implementation cp --abi cp36m --dest ..\AppData\Local
pip download --no-deps --only-binary :all: --platform manylinux1_x86_64 --python-version 36 --implementation cp --abi cp36m --dest ..AppData\Local
pip download --no-deps --only-binary :all: --platform manylinux1_x86_64 --python-version 36 --implementation cp --abi cp36m --dest ..AppData\Local
pip wheel --no-deps --no-binary :all: --wheel-dir ..AppData\Local\Temp\azureworker20z8e3i6 bcrypt==3.1.6
There was an error restoring dependencies. ERROR: cannot install bcrypt-3.1.6 dependency: binary dependencies without wheels are not supported. Use the --build-ne dependencies using a Docker container. More information at https://aka.ms/func-python-publish
解决方案
我能够通过在本地机器上安装 docker 并使用 CLI 命令构建和部署到 azure function app 来解决这个问题 -
func azure functionapp 发布 --build-native-deps
推荐阅读
- debugging - 如何让浏览器识别在 Kotlin/Js 的一些外部 Kotlin 库中设置的断点?
- c - 我对如何解决这个警告和错误有点困惑
- mismatch - 运行时错误“13”找不到问题的解决方案
- javascript - 将数组元素更改为具有键、值的对象
- spring - 为什么我在 Spring Boot pom.xml 文件中有此警告?“覆盖 mariadb-java-client 的托管版本 1.5.9”
- python - 在熊猫中将具有不规则采样的单列拆分为具有相同时间戳的多列
- python - 缩进中制表符和空格的不一致使用是什么?
- arrays - 对角线数组从右上到左下遍历
- c# - 将两个 c# object(json) 列表合并为父子
- windows - 是否可以仅使用 Windows 在没有 BIOS 的情况下启动 USB?