Troubles with sychopy on Ubuntu 20.04.2 LTS

Hi everyone,

I’m trying to install Psychopy on Ubuntu 20.04… At first I tried the pip installation procedure and the conda procedure as well. Both installations went on quite smoothly, but unfortunately I cannot run Psychopy. I’ve also read all Ubuntu-related messages here, trying to figure out any missing library or so, but with no luck.
Here’s the error message I get when launching Psychopy from outside conda:

Traceback (most recent call last):
File “/home/laboratorio/anaconda3/bin/psychopy”, line 8, in
File “/home/laboratorio/anaconda3/lib/python3.8/site-packages/psychopy/app/”, line 100, in main
File “/home/laboratorio/anaconda3/lib/python3.8/site-packages/psychopy/app/”, line 22, in start_app
from import PsychoPyApp
File “/home/laboratorio/anaconda3/lib/python3.8/site-packages/psychopy/app/”, line 24, in
from . import themes
File “/home/laboratorio/anaconda3/lib/python3.8/site-packages/psychopy/app/themes/”, line 1, in
from ._themes import ThemeMixin, IconCache
File “/home/laboratorio/anaconda3/lib/python3.8/site-packages/psychopy/app/themes/”, line 5, in
import wx
File “/home/laboratorio/anaconda3/lib/python3.8/site-packages/wx/”, line 17, in
from wx.core import *
File “/home/laboratorio/anaconda3/lib/python3.8/site-packages/wx/”, line 12, in
from ._core import *
ImportError: /lib/x86_64-linux-gnu/ undefined symbol: hb_ot_metrics_get_position

And here’s what I get launching Psychopy from within the coda environment:

pygame 2.0.1 (SDL 2.0.14, Python 3.6.12)
Hello from the pygame community.
Traceback (most recent call last):
File “/home/laboratorio/anaconda3/envs/psychopy/bin/psychopy”, line 11, in
File “/home/laboratorio/anaconda3/envs/psychopy/lib/python3.6/site-packages/psychopy/app/”, line 100, in main
File “/home/laboratorio/anaconda3/envs/psychopy/lib/python3.6/site-packages/psychopy/app/”, line 22, in start_app
from import PsychoPyApp
File “/home/laboratorio/anaconda3/envs/psychopy/lib/python3.6/site-packages/psychopy/app/”, line 56, in
from .utils import FileDropTarget
File “/home/laboratorio/anaconda3/envs/psychopy/lib/python3.6/site-packages/psychopy/app/”, line 25, in
from . import pavlovia_ui
File “/home/laboratorio/anaconda3/envs/psychopy/lib/python3.6/site-packages/psychopy/app/pavlovia_ui/”, line 19, in
from .functions import *
File “/home/laboratorio/anaconda3/envs/psychopy/lib/python3.6/site-packages/psychopy/app/pavlovia_ui/”, line 13, in
from ._base import PavloviaMiniBrowser, PavloviaCommitDialog
File “/home/laboratorio/anaconda3/envs/psychopy/lib/python3.6/site-packages/psychopy/app/pavlovia_ui/”, line 9, in
import wx.html2
File “/home/laboratorio/anaconda3/envs/psychopy/lib/python3.6/site-packages/wx/”, line 15, in
from ._html2 import *
ImportError: cannot open shared object file: No such file or directory
3.9587 WARNING We strongly recommend you activate the PTB sound engine in PsychoPy prefs as the preferred audio engine. Its timing is vastly superior. Your prefs are currently set to use [‘sounddevice’, ‘PTB’, ‘pyo’, ‘pygame’] (in that order).

Thank you for any help.


According to this post about a different project, Ubuntu 20.04 may not include libwebkitgtk-1.0 like previous versions did. The simpliest suggest fix I saw was to try installing the missing lib using:

sudo add-apt-repository 'deb bionic main universe'
sudo apt install -t bionic libwebkitgtk-1.0-0

Thank you very much, Sol, after installing the old lib, I can run Psychopy within the conda environment!! Actually, I still can’t run it from outside conda, but… so far so good.


I’m liking anaconda on linux, it makes it easy to have python 3.6 and 3.8 env’s side by side and seems to reduce the chances of conflicts (for lack of a better word) with the system python version installed.

1 Like