rebuilding the opencv-python wheel installer

Viewed 1395

I am using the opencv-python project here. What I would like to do is recreate the wheel file again. So what I did was something like:

python setup.py bdist_wheel

This creates a dist directory and adds the wheel file there which I then take and try to install in an Anaconda environment as follows:

pip install ~/opencv_python-3.4.2+5b36c37-cp36-cp36m-linux_x86_64.whl

This is fine and seems to install fine. But when I try to use it and do

import cv2

I get the error:

ImportError: libwebp.so.5: cannot open shared object file: No such file or directory

I thought that creating the wheel file would take care of all the dependencies but I wonder if I have to do something else before the wheel generation to make sure everything is packaged correctly?

EDIT

I compare the wheel archives from the official sources and the one I generated and I see that the third party libraries are not included. So, my zip file contents are:

['cv2/LICENSE-3RD-PARTY.txt', 
 'cv2/LICENSE.txt', 'cv2/__init__.py', 
 'cv2/cv2.cpython-36m-x86_64-linux-gnu.so']

I have omitted some XML files which are not relevant. Meanwhile, the official archive has:

['cv2/__init__.py', 
 'cv2/cv2.cpython-36m-i386-linux-gnu.so', 
 'cv2/.libs/libswresample-08248319.so.3.2.100', 
 'cv2/.libs/libavformat-d485f70f.so.58.17.101', 
 'cv2/.libs/libvpx-1b5256ac.so.5.0.0', 
 'cv2/.libs/libz-83853723.so.1.2.3', 
 'cv2/.libs/libQtGui-55070e59.so.4.8.7', 
 'cv2/.libs/libavcodec-3b67922d.so.58.21.104', 
 'cv2/.libs/libswscale-3bf29a6c.so.5.2.100', 
 'cv2/.libs/libQtTest-0cf8861e.so.4.8.7', 
 'cv2/.libs/libQtCore-ccf6d197.so.4.8.7', 
 'cv2/.libs/libavutil-403a4871.so.56.18.102']
0 Answers
Related