Installation

Download

For the easiest installation download and install the Standalone package.

For all versions see the PsychoPy releases on github

PsychoPy® is distributed under the GPL3 license

Manual installations

See below for options if you don’t want to use the Standalone releases:

pip install

Now that most python libraries can be installed using pip it’s relatively easy to manually install PsychoPy® and all it’s dependencies to your own installation of Python.

The steps are to fetch Python. This method should work on a range of versions of Python but we strongly recommend you use Python 3.8. Older Python versions are no longer being tested and may not work correctly. Newer Python versions may not have wheels for all the necessary depedencies even though we believe that PsychoPy’s code, itself, is compatible all the way up to Python 3.10.

You can install PsychoPy® and its dependencies (more than you’ll strictly need, depending on the features you use) by:

pip install psychopy

If you prefer not to install all the dependencies (e.g. because the platform or Python version you’re on doesn’t have that depedency easily available) then you could do:

pip install psychopy --no-deps

and then install them manually. On Windows, if you need a package that isn’t available on PyPI you may want to try the unofficial packages by Christoph Gohlke

brew install

On a MacOS machine, brew can be used to install PsychoPy®:

brew install --cask psychopy

Linux

There used to be neurodebian and Gentoo packages for PsychoPy® but these are both badly outdated. We’d recommend you do:

# with --no-deps flag if you want to install dependencies manually
pip install psychopy

Then fetch a wxPython wheel for your platform from:

https://extras.wxpython.org/wxPython4/extras/linux/gtk3/

and having downloaded the right wheel you can then install it with something like:

pip install path/to/your/wxpython.whl

wxPython>4.0 and doesn’t have universal wheels yet which is why you have to find and install the correct wheel for your particular flavor of linux.

For some reasons wxPython (wx.html2) is using an older version of libwebkitgtk e.g. psychopy will not show up to fix this (of our own risk): sudo add-apt-repository ‘deb http://archive.ubuntu.com/ubuntu bionic main universe’ sudo apt install -t bionic libwebkitgtk-1.0-0

Building Python PsychToolbox bindings:

The PsychToolbox bindings for Python provide superior timing for sounds and keyboard responses. Unfortunately we haven’t been able to build universal wheels for these yet so you may have to build the pkg yourself. That should not be hard. You need the necessary dev libraries installed first:

sudo apt-get install libusb-1.0-0-dev portaudio19-dev libasound2-dev

and then you should be able to install using pip and it will build the extensions as needed:

pip install psychtoolbox

Anaconda and Miniconda

We provide an environment file that can be used to install PsychoPy® and its dependencies. Download the file, open your terminal, navigate to the directory you saved the file to, and run:

conda env create -n psychopy -f psychopy-env.yml

This will create an environment named psychopy. On Linux, the wxPython dependency of PsychoPy® is linked against webkitgtk, which needs to be installed manually, e.g. via sudo apt install libwebkitgtk-1.0 on Debian-based systems like Ubuntu.

To activate the newly-created environment and run PsychoPy®, execute:

conda activate psychopy
psychopy

Developers install

Ensure you have Python 3.8 and the latest version of pip installed:

python --version
pip --version

Next, follow the instructions to fork and fetch the latest version of the PsychoPy® repository.

From the directory where you cloned the latest PsychoPy® repository (i.e., where setup.py resides), run:

pip install -e .

This will install all PsychoPy® dependencies to your default Python distribution (which should be Python 3.8). Next, you should create a new PsychoPy® shortcut linking your newly installed dependencies to your current version of PsychoPy® in the cloned repository. To do this, simply create a new .BAT file containing:

"C:\PATH_TO_PYTHON3.8\python.exe C:\PATH_TO_CLONED_PSYCHOPY_REPO\psychopy\app\psychopyApp.py"

Alternatively, you can run the psychopyApp.py from the command line:

python C:\PATH_TO_CLONED_PSYCHOPY_REPO\psychopy\app\psychopyApp

Back to top