Python Dependency issue: Issues installing opencv
See original GitHub issueHello.
I’m having issues installing opencv. I’m publishing my function through the CLI using the following command:
func azure functionapp publish testPSA2 --build-native-deps
The publishing is not a problem and it worked just fine a couple of months ago, but when I got back to the project to make some changes I get the following error when running the function:
2019-05-07T08:11:27.146 [Error] Executed 'Functions.processImageEvent' (Failed, Id=316890eb-95ed-4eda-8ed4-b1136a758b1c)
Result: Failure
Exception: ImportError: libgthread-2.0.so.0: cannot open shared object file: No such file or directory
Stack: File "/home/site/wwwroot/worker_venv/lib/python3.6/site-packages/azure/functions_worker/dispatcher.py", line 203, in _handle__function_load_request
func_request.metadata.entry_point)
File "/home/site/wwwroot/worker_venv/lib/python3.6/site-packages/azure/functions_worker/loader.py", line 66, in load_function
mod = importlib.import_module(fullmodname)
File "/usr/local/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 941, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/site/wwwroot/processImageEvent/__init__.py", line 3, in <module>
import cv2
File "/home/site/wwwroot/worker_venv/lib/python3.6/site-packages/cv2/__init__.py", line 3, in <module>
from .cv2 import *
My requirements.txt looks the following:
asn1crypto==0.24.0
azure-common==1.1.17
azure-cosmosdb-nspkg==2.0.2
azure-cosmosdb-table==1.0.5
azure-functions==1.0.0a5
azure-functions-worker==1.0.0a6
azure-nspkg==3.0.2
azure-storage-blob==1.4.0
azure-storage-common==1.4.0
certifi==2018.11.29
cffi==1.11.5
chardet==3.0.4
cryptography==2.5
grpcio==1.14.2
grpcio-tools==1.14.2
idna==2.8
numpy==1.15.4
opencv-python==3.4.5.20
protobuf==3.6.1
pycparser==2.19
python-dateutil==2.7.5
requests==2.21.0
scipy==1.2.0
six==1.12.0
urllib3==1.24.1
I have posted a similar issue here, deploying jobs to a GPU cluster using Azure ML SDK: https://github.com/Azure/MachineLearningNotebooks/issues/252#issuecomment-478838718
Have anyone encountered a fix? if so please let me know. The opencv package is critical to a lot of my algorithms.
Best Regards Niels
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:45 (9 by maintainers)
Top Results From Across the Web
Can't install OpenCV python3.8 - Stack Overflow
Try to upgrade your pip with pip install --upgrade pip. and then run the pip install opencv-python.
Read more >Error installing opencv python
hello, some time ago I asked a question regarding the installation of opencv and it was in a 32 bit operating system and...
Read more >Solved: Re: Python OpenCV installation error - NXP Community
I am trying to install OpenCV package for Python on my 8MM NavQ Computer using pip package installer. I am facing the following...
Read more >Got an error while installing opencv-python - Edureka
I am using python 2.7.18. I want to install opencv-python using command prompt but it is showing me the error as follows:.
Read more >I am trying to install opencv but this error show to me my py ...
NumPy only supports Python 3.11 since 1.23.2. The version of OpenCV you are trying to install is pinned to an earlier version, so...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m having the same issue working with azure webapp deploying in a Linux environment, Is there any update?
Thanks @anirudhgarg
I confirmed that
opencv-python-headless
which needs less libraries thanopencv-python
works on python function app of consumption plan so it seems thatlibgthread-2.0.so.0
andlibglib-2.0.so.0
are installed.