Unable to deploy Azure Function (VSCode) with "arcgis" (latest) python package

Meyer Lorenz (IT-PTR-BDE4) 15 Reputation points
2024-04-12T05:55:47.1466667+00:00

Hi

I try to deploy an Azure Function App through VSCode. The deployment takes more than half an hour and never succeeds when in my requirements.txt the python package "arcgis" is listed. At least the arcgis latest version does not work for deployment. With "arcgis==1.9.1" in requirements.txt it worked. But deploying an azure function app is really a pain! :-( The deployment does a zip deployment with a pip install on Azure.

Anybody an idea what goes wrong?

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,363 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 26,241 Reputation points Microsoft Employee
    2024-04-29T19:18:59.1933333+00:00

    Hi @Meyer Lorenz (IT-PTR-BDE4),

    I've never experienced this issue before. However, I am seeing similar behavior when using arcgis package. Seems very similar to this existing issue; https://community.esri.com/t5/arcgis-api-for-python-questions/suddenly-can-t-build-and-deploy-python-azure/td-p/1205235 by way of https://learn.microsoft.com/en-us/answers/questions/1091647/arcgis-package-install-azure-functions. I did attempt to deploy using GitHub actions and what I'm seeing is a wheel dependency failing to install with the latest package.

            Getting requirements to build wheel: started
            Getting requirements to build wheel: finished with status 'error'
            error: subprocess-exited-with-error
          
            × Getting requirements to build wheel did not run successfully.
            │ exit code: 1
            ╰─> [25 lines of output]
                /bin/sh: 1: krb5-config: not found
                Traceback (most recent call last):
                  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
                    main()
                  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
                    json_out['return_val'] = hook(**hook_input['kwargs'])
                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
                    return hook(config_settings)
                           ^^^^^^^^^^^^^^^^^^^^^
                  File "/tmp/pip-build-env-138ukwde/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
                    return self._get_build_requires(config_settings, requirements=['wheel'])
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  File "/tmp/pip-build-env-138ukwde/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
                    self.run_setup()
                  File "/tmp/pip-build-env-138ukwde/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 311, in run_setup
                    exec(code, locals())
                  File "<string>", line 109, in <module>
                  File "<string>", line 22, in get_output
                  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/subprocess.py", line 466, in check_output
                    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/subprocess.py", line 571, in run
                    raise CalledProcessError(retcode, process.args,
                subprocess.CalledProcessError: Command 'krb5-config --libs gssapi' returned non-zero exit status 127.
                [end of output]
          
            note: This error originates from a subprocess, and is likely not a problem with pip.
          error: subprocess-exited-with-error
          
          × Getting requirements to build wheel did not run successfully.
          │ exit code: 1
          ╰─> See above for output.
    

    The issue could be related to this package and the step of building this wheel, but I have shared this issue with the product team for any insights. Whatever I'm able to find out, I'll post. For now, I recommend continuing to use the package version that works.


    EDIT 2024 May 13

    When building locally, the way the wheel is restored works differently between Windows and Linux. In my case, I'm developing on a Windows machine pushing to a Linux host. Therein lies the issue with gssapi package.

    As suggested below, a custom container path forward for this issue to counteract this issue.

    1 person found this answer helpful.