Ask Your Question
0

How can I convert SimpleCV script to a stand-alone executable for Windows 7

asked 2013-01-08 00:45:14 -0500

cipher gravatar image

updated 2013-01-19 01:24:30 -0500

Hi All,

I have a small simplecv script that I would like to share with others. So i tried converting it using pyinstaller but it didn't go quite well. I encountered some errors, can someone please suggest the best way to do that.

Will appreciate the help.

edit retag flag offensive close merge delete

Comments

What do you mean by stand-alone executable?

jayrambhia gravatar imagejayrambhia ( 2013-01-09 15:06:27 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2013-01-09 16:38:36 -0500

xamox gravatar image

This more than likely is not possible. SimpleCV as with most python libraries expect you to have the libraries installed at a system level (Think of .NET applications requiring .NET to be installed before a .exe file will work). The work around is to install everything into a virtualenv in python (but they still need python installed on their system). I also tried to use pyinstaller to make a single .exe file for the SimpleCV installer on windows and found it was extremely buggy using just the standard built in python Tk widget interface, nothing even SimpleCV related. You can try but I'm guessing you are heading down a dead end road. If you want to distribute the script you should just send them the .py file and they will just need SimpleCV installed. If you are worried about them trying to 'steal' or 'see' the code you could always just send them the .pyc file (compiled python) version and it should run fine as long as SimpleCV is installed as well.

edit flag offensive delete link more
0

answered 2013-01-11 09:51:19 -0500

cipher gravatar image

updated 2013-01-16 12:49:22 -0500

Thanks Xamox for your insights.

I also tried PyInstaller. I succeeded in creating an executable without any errors from PyInstaller (I had to install "roman" library as well as "zmq" to get it working) but the executable displays a window from SimpleCV.Display() and stops working.

Is there a way I can see the error message from the program?

I am just hoping that it might be possible to create a PyQt application if this works!

Help will be much appreciated.

edit flag offensive delete link more

Comments

We have a logger built into simplecv if you don't want to write to the terminal, so all output could write to a file. import SimpleCV. SimpleCV.base.initlogging(). SimpleCV.base.setlogger(1,'/tmp/logfile.txt'). SimpleCV.log('put stuff here').

xamox gravatar imagexamox ( 2013-01-19 09:35:23 -0500 )edit

Thanks @xamox for your help and prompt reply. I am not sure which portion of my code generates the error. I do not see any errors when i run my python script. I only get error when I try to run the executable generated by PyInstaller. What is the best way to start debugging it in that case?

cipher gravatar imagecipher ( 2013-01-19 21:34:53 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-01-08 00:45:14 -0500

Seen: 912 times

Last updated: Jan 19 '13