make an executable out of a psychopy .py file

722 views
Skip to first unread message

Bartholdy

unread,
Jan 31, 2011, 12:18:53 PM1/31/11
to psychopy-users
Hi,

now that I managed to get psychopy running via the terminal on Mac OS
X 10.6.6 (thanks to the great help of Emily and Jeremy)
I was wondering if it is possible to transform a python-script using
psychopy into an executable (an .app and/or .exe).

So that I can run a stimulus presentation on a windows or mac PC on
which psychopy / python is not installed.

Is that possible?

I had a look into cx_freeze and pyinstaller, so far without success –
would that be the way to go?
Has someone here any experience with this?



I know that I could install the psychopy GUI version – but in my case
its problematic to install new software on a lot of lab-computers etc.


thanks for any suggestions in advance.

Dave Britton

unread,
Jan 31, 2011, 3:44:21 PM1/31/11
to psychop...@googlegroups.com
There are too many underlying low level c code routines in numpy,
pyglet, opengl and pygame that require c code extensions for py2exe
(http://www.py2exe.org/) to work as of the last time I checked, and
py2exe is the usual way of turning python code into a stand-alone
windows executable. I assume you ran into this trying to use cxfreeze
also. Unless you can dig into the c sources you may not be able to do
this. I recommend putting your entire installation including python and
all the psychopy dependencies on a flash drive, setting the pythonpath
to the flashdrive, and running it from there with the whole flashdrive
available. You can move the flashdrive around between computers, and
replicate it to as many other flashdrives as you need. (When in doubt
throw more hardware at the problem. :~)
-Dave

Bartholdy wrote:
> Hi,
>
> now that I managed to get psychopy running via the terminal on Mac OS
> X 10.6.6 (thanks to the great help of Emily and Jeremy)
> I was wondering if it is possible to transform a python-script using
> psychopy into an executable (an .app and/or .exe).
>
> So that I can run a stimulus presentation on a windows or mac PC on
> which psychopy / python is not installed.
>
> Is that possible?
>

> I had a look into cx_freeze and pyinstaller, so far without success �


> would that be the way to go?
> Has someone here any experience with this?
>
>
>

> I know that I could install the psychopy GUI version � but in my case

Jon Peirce

unread,
Feb 1, 2011, 11:56:44 AM2/1/11
to psychop...@googlegroups.com
Installing the GUI version on a mac doesn't need any special install.
Any user can grab a copy and run it from anywhere on their machine.
I.e. It's equivalent but easier than what you're suggesting if I've
understood you.


Jon

--
Jonathan Peirce
http://www.peirce.org.uk

> --
> You received this message because you are subscribed to the Google Groups "psychopy-users" group.
> To post to this group, send email to psychop...@googlegroups.com.
> To unsubscribe from this group, send email to psychopy-user...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/psychopy-users?hl=en.
>

Reply all
Reply to author
Forward
0 new messages