Writing to share how I run PsychoPy with Miniconda (Anaconda's minimalist conda distribution) on OSX. Getting this to work has been somewhat tricky in the past because of a few complications (for me, these complications were mostly pyglet and pygame). But now, lots of people on the internet have solved these problems, so it is a bit easier. I thought I'd post how I do this, just in case others in the community are interested. (These instructions would obviously also work for full Anaconda.)
(1) This is how I run all of my experiments in our lab, which make heavy use of psychopy.visual, sound, and data. I haven't used any video.
(2) It has worked on several different Mac machines, all running between 10.6 and 10.10 (but I do not have evidence of success beyond our lab computers)
(3) I use .csv files (and not .xlsx), so my experiments don't test openpyxl (but the conda recipe retrieves it, so it may work ok)
(4) I don't use psychopy.gui normally. When I do, I have to run experiments with [ pythonw experimentfile.py ] because gui really wants a Framework build of python, and using pythonw forces that situation.
(5) To use pygame for sound, you need to make sure psychopy chooses it (and not pyo). I do this by putting this at the top of my scripts
OK, on to the good stuff.
# download and install the latest distribution of miniconda or anaconda for OSX (64-bit is the only option)
# answer 'yes' to all of the questions
# close and then reopen the terminal to start using conda
# check that miniconda is installed
conda info
# miniconda adds itself to your path to become your default python. check that this is true
which python
# and make sure that everything is up to date
conda update conda
Get Psychopy
# use conda to get psychopy and its dependents
# (1) gets psychopy version 1.82.01
# (2) gets pandas (because miniconda doesn't come with it)
# (3) stops getting pyglet (this version of pyglet had a bug for OSX<10.10)
# you can install it in anaconda using
conda install -c kschuler psychopy=1.82.01
Get pygame and pyglet
# To run your experiments in psychopy, you'll probably want both pyglet and pygame.
# If you were hoping for pyo - me too! But there isn't an easy solution to that, yet.
# (pyo is not compatible with 64-bit python, which is the only anaconda option on OSX)
# Both pygame and pyglet require a tiny bit of extra effort to get them into your conda environment.
pygame
# Pygame is probably going to be most important for people who use sound. That is because psychopy has two sound options:
# (1) pyo - which, as mentioned above, is not currently compatible with 64-bit python (and 64-biy python is the only anaconda option for OSX)
# (2) pygame - which is a great package, but has been kind of a bear to get installed.
# The first big problem for pygame is that it requires a bunch of dependencies that are hard to get right in conda.
# But it works easily when you use homebrew - so lets just do that
# get homebrew (skip this if you already have it)
# and install the pygame dependencies with it
brew install sdl sdl_ttf sdl_image sdl_mixer portmidi
# the second big problem is that the official repository for Pygame doesn't build properly on OSX.
# So we have to retrieve Pygame from a special place (binstar) that does build properly.
# to do this, we need to install anaconda-client
conda install anaconda-client
# and then we can install (the OSX friendly) pygame
pyglet
# all that we have left to do is install pyglet.
# here the problem is that conda really wants to pull pyglet1.2.1, which has that OSX10.10 bug.
# and we really want conda to pull pyglet1.2.4 (which has that bug fixed)
# There is most definitely a way to get this to work in conda, but it has consistently given me trouble.
# (And the goal for me is for this to be easy so that others can use my conda environments to run my experiments without issues)
# installing pyglet with pip works like a dream for psychopy. So I'm content with just doing that
# first create your conda enviroment for psychopy. You can name it whatever you want, but I like psychopyenv
# and tell your environment to have psychopy and pygame
conda create -n psychopyenv psychopy pygame
# then you can navigate to your environment
source activate psychopyenv
# and install pyglet with pip
pip install pyglet
Things should work!
Hope this helps!
Katie