* Remember to make sure you revert to a DHCP assigned IP address after you've installed VisionEgg to reinstate the firewall protection.

* Remember to make sure you revert to a DHCP assigned IP address after you've installed VisionEgg to reinstate the firewall protection.

4. Install libjpeg via terminal

4. Install libjpeg via terminal

<br><code>

<br><code>

-

sudo port install jpeg</code>

+

sudo port install jpeg</code>

-

If MacPorts can't find libjpeg to install, download and unzip the .tar ball from [http://www.ijg.org/files/jpegsrc.v8b.tar.gz this address] and after changing the present working directory interminal to that directory, run the above command.

+

If MacPorts can't find libjpeg to install, download and unzip the [http://www.ijg.org/files/jpegsrc.v8b.tar.gz .tar ball] and after changing the present working directory interminal to that directory, run the above command.

Other

WINDOWS: Psychopy installation. It is easier to intall Enthought Python Distribution that contains all the necessary dependencies than to install at hand one by one the dependencies. Using Enthought, however, I found incompatibilities with Visionegg. Installing the dependencies at hand I did not have problems to run both programs in the same computer.

OSX

Site packages (like visionegg and psychopy non-standalone version) should reside in a directory given by, at python prompt:

from distutils.sysconfig import *
print get_python_lib()

OSX confusingly has three places for Python packages, /System/Library/... and /Library/Python/2.5/site-packages and also /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages You probably want to use /Library/Frameworks/... version. (why are silverTow, sarah's iMac, and Kuna laptop all set to /Library/Python and how do I change that? Kuna nevertheless finds packages in /Library/Frameworks) Some python installation instructions, related issue

If you want to grab code from the bleeding edge repository version, you better know what's in subversion etc notes
Also info there in subversion etc notes about accessing standalone PsychopyIDE libraries from a terminal session.

VisionEgg 1.2.1 Installation experience for Lee on IMac OSX10.6

Python 2.6, Pygame and PyOpenGL were already installed.
1. Install / update XTools (you may have to upgrade MacOSX).
2. Install / update MacPorts
3. Sync MacPorts (
sudo port selfupdate)
You may need to set up proxy through terminal so call Nenad for a free static IP address that you can manually input to bypass the firewall, then use the following commands in terminal:

export http_proxy='proxy:port'
export rsync_proxy='proxy:port'

Remember to make sure you revert to a DHCP assigned IP address after you've installed VisionEgg to reinstate the firewall protection.

4. Install libjpeg via terminal

sudo port install jpeg

If MacPorts can't find libjpeg to install, download and unzip the .tar ball and after changing the present working directory interminal to that directory, run the above command.
5. Download PIL1.1.7 from source6. Extract the PIL tar ball and edit the setup.py file within:

the line starting with JPEG_ROOT should be changed to:
JPEG_ROOT="opt/local/lib/libjpeg.dylib"

Just be sure to check that the opt/local/lib/libjpeg.dylib file does indeed exist. If not, find where libjpeg installed the file and input that address between the quotes.

7. After changing to the PIL directory, compile and build it from source:

sudo python2.6 setup.py install

Check to make sure you can find a PIL folder in the Python 2.6 'site-packages' directory

VisionEgg Installation experience for ShihYu on MacBook OSX10.5

easy_install VisionEgg
executes and puts the .egg in /sw/lib/python2.5/site-packages
But import VisionEgg still failed. Adding the VisionEgg egg directories to the python path didn't help.
When Fahed moved the VisionEgg directory to the site-packages directory where other packages live, it worked!

However, "import pygame" does not work and said we have the wrong version of PyObjC. We downloaded pyobjc-1.4-py2.5-macosx10.4.mpkg.zip from where it was linked to at http://pygame.org/wiki/PyObjC
Then pygame worked.

However still the way we draw things in our programs doesn't work, not sure why. Ah, apparently going to python2.5 is supposed to use pyglet for everything, which requires different functions for mouse polling (see demo: mouse.py) and maybe other minor changes, see next section:

adapting to pyglet

The 'depth=-1' kwarg which I was using for fixation now makes it invisible. Just delete it, we don't seem to need it

The functions for polling the mouse have different names. I handle that by giving the functions the same names:

older

I think I didn't use that version (with pyglet extensions) with 2.5 yet. Will try to look into it.

I think it's to do with PsychoPy selecting the wrong openGL to draw to (PyOpenGL and pyglet.GL aren't compatible and require different argument types). I should be able to look into it, but could you let me know which version of Pyglet (if any) you've installed?

cheers, as ever, for the useful feedback,
Jon

Alex Holcombe wrote:
Hi Jon,
We have a new machine and decided to try using psychopy with python2.5. We installed from source PsychoPy-0.93.4 and tried to install the dependencies correctly by going through the list in the dependenciesOSXuniversal package for python2.4, and finding the appropriate packages on the web for python2.5. Unfortunately upon running the psychopy demos we get an error triggered by the visual.Patchstim commands, for example upon running clockface.py we get the following output:

Traceback (most recent call last):

File "clockface.py", line 12, in <module>
tex=None, mask=minHand,interpolate=False)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/psychopy/visual.py", line 1030, in __init__
self._setTex(tex)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/psychopy/visual.py", line 1533, in _setTexNoShaders
GL.glBindTexture(GL.GL_TEXTURE_1D, self.texID)#bind that name to the target

We can go back to using psychopy with python2.4 if necessary, but I thought I'd let you know about this as you mentioned on the webpage that you might provide Python2.5 installers if someone asked. Incidentally, even other demo programs not dependent on visual seem to get errors, such as demo_sound.py, which gives the output at the bottom of this email. Anyway no worries if you don't have time for this, thanks for all the code, we're happily using psychopy in conjunction with some visionEgg for all our experiments now.

Hi Alex,
two options. This is the code I used just to get thigns going, and tested against a parallel port on winXP. Pyglet sounds can be used alongside pygame for windowing etc... so that you don't need to change too much other code. One thing you should be aware of is the need to dispatch_events() for pyglet.media

Alternatively, the pyglet backend for PsychoPy is nearly there. The only things missing are a set.gamma function for the window (do you need gamma correction?) and controls for the mouse. I'll try and have a new OS X build for you to play with in the next 1/2 hr. Obviously, going this route will need a bit more testing at your end to make sure it

LPT1 = 0x378#address for parallel port on many machines
pinNumber = 2#choose a pin to write to (2-9).
A.play()
_parallel.out(LPT1, 2**(pinNumber-2))#sets just this pin to be high (pin2 represent databit 0, pin3=bit1...)

clock = core.Clock()
while clock.getTime()<5.0:

pyglet.media.dispatch_events()#have to call this or pyglet sound manager doesn't update its buffer
if len(event.getKeys())>0:
break