如何在 Azure Functions 中使用 Geoplot(GEOS/PROJ 问题)

Posted

技术标签:

【中文标题】如何在 Azure Functions 中使用 Geoplot(GEOS/PROJ 问题)【英文标题】:How to use Geoplot in Azure Functions (GEOS/PROJ issue) 【发布时间】:2022-01-13 06:03:21 【问题描述】:

我一直在尝试构建一个需要 Geoplot 的 python Azure 函数。但是,当我尝试部署它时,我收到一条错误消息,可能是由于 GEOS/PROJ。以下是部分输出:

下载 Cartopy-0.20.1.tar.gz (10.8 MB) 安装构建依赖项:开始 安装构建依赖项:已完成,状态为“完成” 获取制作***的要求:开始 错误:命令出错,退出状态为 1: 获取构建车轮的要求:完成状态为“错误” 命令:/tmp/oryx/platforms/python/3.8.12/bin/python3.8 /tmp/oryx/platforms/python/3.8.12/lib/python3.8/site-packages/pip/_vendor/ pep517/_in_process.py get_requires_for_build_wheel /tmp/tmp8ki7x3mh cwd: /tmp/pip-install-q5qyetv4/cartopy 完整输出(3 行): setup.py:117:用户警告:无法确定 GEOS 版本。确保您已安装 3.7.2 或更高版本,否则安装可能会失败。 warnings.warn( 必须安装 Proj 8.0.0。 错误:命令出错,退出状态为 1:/tmp/oryx/platforms/python/3.8.12/bin/python3.8 /tmp/oryx/platforms/python/3.8.12/lib/python3.8/ site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmp8ki7x3mh 检查日志以获取完整的命令输出。

如何在 Azure 函数中使用 Geoplot?

【问题讨论】:

您好@Tuk31n,您是否安装了最新版本的 GEOS 和 Proj ..? 感谢您的回答。我在本地安装了最新版本,但部署功能时似乎无法安装。 【参考方案1】:

但是,当我尝试部署它时,我收到一条错误消息,可能是由于 GEOS/项目。

这里有一些解决方法需要检查

请确保您已在本地安装GEOS/PROJ。

如果您的本地有 Anaconda,请尝试以下 cmdlt 进行安装

conda install -c conda-forge cartopy

更多信息请参考以下链接:

所以线程:Install Cartopy & dependencies on Windows

MS 医生:Transform relational data with Pandas and Azure Function Apps。

【讨论】:

以上是关于如何在 Azure Functions 中使用 Geoplot(GEOS/PROJ 问题)的主要内容,如果未能解决你的问题,请参考以下文章

如何在 Azure Functions 中使用 Geoplot(GEOS/PROJ 问题)

如何在 Visual Studio 中使用 .NET 5(独立进程)调试 Azure Functions?

如何配置我的 Azure Functions 环境,以便可以在 Python 代码中使用 Cosmos DB 客户端?

如何使用 Python Azure Functions QueueTrigger 手动使消息出队?

Azure Functions with java - 如何获取写入函数的日志?

如何使用应用服务对 Azure Functions 应用进行身份验证/授权?