| Reference | Downloads | Github

Import eror for libwebkit2gtk

Hi all,

I am reinstalling psychopy on Ubuntu 20.04. It was previously working, but I had to reinstall after changing python versions. I believe I followed the installation directions

pip install psychopy
pip install psychopy/wxPython-4.1.1-cp38-cp38-linux_x86_64.whl
sudo apt-get install libusb-1.0-0-dev portaudio19-dev libasound2-dev

Everything seemed to install correctly. However, I get the following error when I try to run psychopy. Any ideas for a solution would be greatly appreciated.

(base) dfish@dfish-MS-7850:~/Downloads$ psychopy
pygame 2.0.1 (SDL 2.0.14, Python 3.8.8)
Hello from the pygame community.
PTB-INFO: Using modified PortAudio V19.6.0-devel, revision unknown
Traceback (most recent call last):
  File "/home/dfish/anaconda3/bin/psychopy", line 8, in <module>
  File "/home/dfish/anaconda3/lib/python3.8/site-packages/psychopy/app/", line 100, in main
  File "/home/dfish/anaconda3/lib/python3.8/site-packages/psychopy/app/", line 22, in start_app
    from import PsychoPyApp
  File "/home/dfish/anaconda3/lib/python3.8/site-packages/psychopy/app/", line 57, in <module>
    from .utils import FileDropTarget
  File "/home/dfish/anaconda3/lib/python3.8/site-packages/psychopy/app/", line 27, in <module>
    from . import pavlovia_ui
  File "/home/dfish/anaconda3/lib/python3.8/site-packages/psychopy/app/pavlovia_ui/", line 19, in <module>
    from .functions import *
  File "/home/dfish/anaconda3/lib/python3.8/site-packages/psychopy/app/pavlovia_ui/", line 13, in <module>
    from ._base import PavloviaMiniBrowser, PavloviaCommitDialog
  File "/home/dfish/anaconda3/lib/python3.8/site-packages/psychopy/app/pavlovia_ui/", line 9, in <module>
    import wx.html2
  File "/home/dfish/anaconda3/lib/python3.8/site-packages/wx/", line 15, in <module>
    from ._html2 import *
ImportError: /usr/lib/x86_64-linux-gnu/ undefined symbol: gst_gl_display_egl_new_with_egl_display
5.8272 	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).

This might help:

sudo apt-get install libwebkit2gtk-4.0-37