Share via

Azure deploy - How to deploy code on Azure linux with cv2 and pyzbar libraries?

Kunal Sawner 6 Reputation points
2022-07-26T18:13:50.96+00:00

We have test run the code to read QR code through CV2 as well as PIL/pyzbar libraries. It runs fine on windows platform when deployed on local host. But the same code gives error JSONdecodeError(ExpectedValue..) and error code 500. As checked, this should be because Azure deploys it on Llinux platform and these libraries are not used on Linux in same way as on windows. Please help to deploy on Azure.

Azure Functions
Azure Functions

An Azure service that provides an event-driven serverless compute platform.

0 comments No comments

1 answer

Sort by: Most helpful
  1. MughundhanRaveendran-MSFT 12,511 Reputation points
    2022-08-02T08:19:03.283+00:00

    @Kunal Sawner ,

    As per the cv2 and pyzbar module docs, they should work fine in Linux OS. cv2 is OS independant and pyzbar has its Linux implementation. As you mentioned, Azure python functions can only run on Linux OS. I dont think that the issue is specific to Linux. Please provide the complete stack of the error message.

    https://pypi.org/project/pyzbar/

    https://pypi.org/project/cv2module/

    Was this answer helpful?

    0 comments No comments

Your answer

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