Ryuii
Ryuii

Reputation: 31

How to use OpenCV with Python in Azure App Service?

I used OpenCV in the App Service of Azure, but an error occurred when installing the extension (pip install opencv-python).

It seems that I can login with SSH on App Service, so after installing the module, login with SSH, and I typed command as following.

apt-get install -y libglib2.0-0 libsm6 libxext6

Then, I typed command as following.

pip install opencv-python

I became can use OpenCV in Python by typing the above command.

I thought that it would automatically install pip when writing to requirements.txt and deploying, but the OS initialized after deployment or restart.

I'm setting up type the apt-get command for each deployment.

Please let me know if there is a way to improve it for use OpenCV.

Upvotes: 1

Views: 2335

Answers (1)

Ryuii
Ryuii

Reputation: 31

The problem was solved by using Azure Web App for Containers.

Exercise - Create and deploy a web app from a Docker image

Upvotes: 2

Related Questions