| Reference | Downloads | Github

PsychoPy3 on Linux installation issues (solved)

After having a few issues with installing PsychoPy3 on Linux (Linux Mint 19.1), below, I listed the necessary steps to get it running. Maybe, some of the issues can be resolved with updates or by including them in the online instructions (Thanks Claire, for the final ffmpeg hint).

Step 1: (not documented online)

sudo apt-get install python3-pip
sudo pip3 install setuptools

Step 2: As instructed online (but with pip3 – and excluding iolabs). Just using pip might lead to using Python2 instead of Python3.

sudo pip3 install numpy scipy matplotlib pandas pyopengl pyglet pillow moviepy lxml openpyxl xlrd configobj pyyaml gevent greenlet msgpack-python psutil tables requests[security] pyosf cffi pysoundcard pysoundfile seaborn psychopy_ext python-bidi psychopy
sudo pip3 install pyserial pyparallel egi   # including 'iolabs' results in an error (Jan 2019)
sudo pip3 install pytest coverage sphinx

Additional (not documented) step 3

# installing wxpython with pip (sudo pip3 install wxpython)
# would get a newer version but resulted in errors
sudo apt-get install python3-wxgtk4.0

# 'Webview' part of wxpython missing:
sudo apt-get install python3-wxgtk-webview4.0

# Missing 'ffmpeg' results in crash shortly after startup, thus:
sudo apt-get install ffmpeg

Now it should start with:

A new Debian version will be released in a few months (April 2019). I’ll test this on the new Debian again. If it is working there, then it should also work on all its descendants (Ubuntu, Mint, etc.).

1 Like

The second to last problem ( No module named ‘wx.html2’ ) is solved by installing the ‘webview’ part of wx

sudo apt-get install python3-wxgtk-webview4.0

Thus wx.html2 works. However, the last problem remains: crash after a few seconds/clicks.
(I updated the respective part in the initial post.)

I was having the same kind of trouble installing Psychopy 3 on Ubuntu 18.10.
What I did was to make sure that the default python was indeed python 3 (running sudo ln -sfn /usr/bin/python3 /usr/bin/python). Then I followed more or less the same steps as you did and ended up with the same problem of Psychopy crashing after a few seconds.
However I noticed from the output window of the Coder view that Psychopy was trying to install the missing ffmpeg package just before crashing. So I installed it directly from outside Psychopy (sudo apt-get install ffmpeg) and it is now working like a charm.
So maybe have a look at the Coder view to see if you don’t run into the same problem ?


1 Like

Awesome. Thank you Claire!
I can confirm this. I did not even see that the Coder view was open behind the Builder (before it crashed). But after knowing what to look for, I could catch a glimpse of something “ffmpeg” in the Coder output window. After install ffmpeg there was no immediate crash anymore and everything seems to work fine.

ps: I updated the initial post to be as informative as possible as to what steps are necessary and what is documented an what not. I hope this helps others and/or helps resolving some of the missing dependencies.

Re: wx, did you try installing from the wheels on For Mint 19.1, I think it would end up being

pip install -f wxPython

(instructions here:

Are you being able to use pavlovia?
I am facing issues (Pavlovia not loading) on fedora and Ubuntu…

After some time, a new issue showed up when installing PsychoPy3 "Requirement.parse(“cryptography>=…), set([‘PyOpenSSL’])”
This was solved by

pip3 install pyopenssl

I followed the steps (on Ubuntu 18.04), but at the end when I type in, the command line returns: command not found…Anyone know why?

Were you ever able to resolve this? I got the same error after installing it :frowning:

Sorry that this hasn’t been easier. I’m afraid the core team developing PsychoPy is very small and busy!

That said, I just tried to install on a VM running a clean install of Ubuntu 20.04 and this appears to work:

sudo apt-get install psychopy   # fetches outdated version from debian
sudo apt-get install python3-pip python3-wxgtk-webview4.0 
# update to latest psychopy:
pip3 install -U psychopy  
 # fix some incompatible lib versions:
pip3 install cffi==1.14.0 psychtoolbox==3.0.16 

Those 4 lines should be enough that you can now start PsychoPy and edit experiments!

To get psychtoolbox working for keyboard use you also need the following steps to raise the priority of the experiment process:

sudo groupadd --force psychtoolbox
sudo usermod -a -G psychtoolbox $USER

then do sudo nano /etc/security/limits.d/99-psychopylimits.conf and copy/paste in the following text to that file:

@psychtoolbox   -  nice       -20
@psychtoolbox   -  rtprio     50
@psychtoolbox   -  memlock    unlimited