Azure Functions: Python - import cython dependent module

Jude Ob 1 Reputation point
2020-11-05T11:36:32.503+00:00

Hello,

I want to import a module [ZigZag] which has a cython dependency, due to this dependency deployment breaks as Cython is not pre-installed in Azure Functions host, putting Cython in my 'requirements.txt' file doesn't help as pip installs somewhat in parallel. I have also tried doing a pip install from my python script (after installing cython through 'requirements.txt' file), this still doesn't work.

Can anyone provide a work-around?

I believe this issue will pop-up as more users deploy python functions since cython is quite necessary for many modules.

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

3 answers

Sort by: Most helpful
  1. MayankBargali-MSFT 70,941 Reputation points Moderator
    2020-11-10T12:55:38.203+00:00

    Hi @Jude Ob

    I can see that the latest version for ZigZag is 0.2.2 and the supported python version is 3.5: https://pypi.org/project/ZigZag/
    The azure function supports 3.6 and above python version which will make it incompatible. You can try installing the latest cython using requirements.txt and it will work as expected. But when you try to install ZigZaG it tries to find the dependency of cython package (Cython==0.26.1) that is compatible with it therefor it throws the error that cython package not found.

    The same observation will be there when you try to install the zigzag in your local machine with 3.6 and above version.


  2. Ananth Ramasamy Meenachi 1 Reputation point
    2020-11-29T20:15:47.247+00:00

    Hi @Jude Ob ,

    I'm on the same boat here. You were able to overcome this issue?

    0 comments No comments

  3. Sarvadnya Mutalik 1 Reputation point
    2021-12-20T14:53:19.347+00:00

    Hi there,

    Can someone suggest what is the resolution please?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.