Packaging Opencv With A Python App
Solution 1:
I've effectively packaged, deployed, and shipped a Python app using OpenCV with cxFreeze.
http://cx-freeze.sourceforge.net/
Yes, cxFreeze auto picked up the python extensions to OpenCV. I had to manually copy the OpenCV DLLs (Windows), but that was a minor issue that can be solved by a post-processing step in cxFreeze. It does pick up other DLL's, so I'm not sure what the issue was.
In fact, it worked so well I was surprised. The ONLY thing it didn't pick up properly was a QT library. Basically here were my steps (I'm using QT so ignore that part if you aren't):
- cxfreeze App.py --target-dir App --base-name Win32GUI --include-modules PySide.QtNetwork
- Copy over the opencv\build\x86\vc9\bin files to the App directory.
That's it.
Solution 2:
You can have a look at http://www.pyinstaller.org/ It's great and it packages the necessary dll for opencv.
For opencv to work it py2exe also package numpy. Make sure you add a dependency for it in case you are using py2exe.
Post a Comment for "Packaging Opencv With A Python App"