Hi Sam,

Did you figure this out? I've had trouble with an OpenCV dependent app as 
well.

Rohan

On Thursday, November 28, 2013 1:14:41 AM UTC-8, Sam Khan wrote:
>
> Hi,
>
> I'm using: mac os x 10.7.5, xcode 4.2.1, python 2.7.5, opencv 2.4.7, 
> PyInstaller 
> 2.1 (Python, NumPy and OpenCV were installed via macports). 
>
> I want to package eyeApp.py whose code and required cascade file are 
> attached. 
>
> I initially faced a problem while using PyInstaller 2.1 (and py2app) which 
> would produce eyeApp.app but the app would crash while trying to import cv2 
> with the message "ImportError: numpy.core.multiarray failed to import". I 
> noticed a topic on numpy.core.multiarray failed 
> import<https://groups.google.com/d/topic/pyinstaller/kpcbdzIDr1c/discussion>issue
>  in this group and from it I adopted the workaround to `import numpy` 
> within my script. 
>
> But now the deployed app doesn't draw center points of the eyes, it only 
> opens the mac camera and exists upon pressing esc key on keyboard. The 
> script works as excpected within eclipse+pydev IDE.
>
> I've tried doing the following:
> pyi-makespec -ws eyeApp.py
>
> which creates the attached eyeApp.spec
>
> then I build the app:
> pyinstaller eyeApp.spec
>
> which produces eyeApp.app that doesn't work as expected.
>
> I modified the eyeApp.spec manually so that COLLECT() is as such:
> coll = COLLECT(exe,
>                a.binaries,
>                a.zipfiles,
>               
>  
> a.datas+[('haarcascade_eye_tree_eyeglasses.xml','./haarcascade_eye_tree_eyeglasses.xml','DATA')]
>  
> ,
>                strip=True,
>                upx=True,
>                name='eyeApp') 
>
> and then build the app again. but it still doesn't work as expected.
>
> I've tried 
> pyi-makespec -wsF eyeApp.py 
>
> with and without manually specifying a.datas+[('name','path','type')] in 
> EXE() and also without the -s option. my app still don't work for me.
>
> I would greatly appreciate any insights you can provide into this 
> situation. I'm particularly interested to know how to build a script that 
> may require an external xml file or a pickle file or other such data files. 
>
> Thank you.
>
> Best,
> Sam 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to