Psychtoolbox Installation Causing All Experiments to be Aborted with PsychoPy v2020.1.2 on Linux Kubuntu 18.04

Hello

I installed PsychoPy v2020.1.2 on Linux Kubuntu 18.04.

When running an experiment I get the following warning:

Import Error: No module named ‘psychtoolbox’. Using event module for keyboard component.

So, I did install the psychtoolbox via

pip3 install psychtoolbox

Interestingly, after this installation the experiments no longer ran. Every execution was abruptly aborted without ever properly starting. There was no specific warning nor error message. However, the following cryptic lines appeared in the runner console:

PTB-CRITICAL: In call to PsychSetThreadPriority(): Failed to set new basePriority 2, tweakPriority 1, effective 1 [REALTIME] for thread (nil) provided!
PsychHID: KbQueueStart: Failed to switch to realtime priority [Operation not allowed].
Fatal Python error: (pygame parachute) Segmentation Fault

After uninstalling the psychtoolbox again the experiments run again. But, I am back to square 1, i.e. I still get the original warning because there is no psychtoolbox installed.

Did anyone encounter the same situation? And if yes, how did you proceed?

Thanks in advance.

Best regards

1 Like

Hi dls,

Yes. I am seeing exactly the same error with PsychoPy v2020.2.3 on Ubuntu 18.04/Dell XPS13 (Sputnik) installed with conda install w/ psychopy-env yaml. I know the linux install requires some additional dependencies so I did this before install

sudo apt install libwebkitgtk-1.0

However, I did not originally do this

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

as

The following packages will be REMOVED:
libjack-jackd2-0

but I went ahead and I saw these warnings as I went

dpkg: libjack-jackd2-0:amd64: dependency problems, but removing anyway as you requested:
mpv depends on libjack-jackd2-0 (>= 1.9.10+20150825) | libjack-0.125; however:
Package libjack-jackd2-0:amd64 is to be removed.
Package libjack-0.125 is not installed.
Package libjack-jackd2-0:amd64 which provides libjack-0.125 is to be removed.
libfluidsynth1:amd64 depends on libjack-jackd2-0 (>= 1.9.10+20150825) | libjack-0.125; however:
Package libjack-jackd2-0:amd64 is to be removed.
Package libjack-0.125 is not installed.
Package libjack-jackd2-0:amd64 which provides libjack-0.125 is to be removed.
gstreamer1.0-plugins-good:amd64 depends on libjack-jackd2-0 (>= 1.9.10+20150825) | libjack-0.125; however:
Package libjack-jackd2-0:amd64 is to be removed.
Package libjack-0.125 is not installed.
Package libjack-jackd2-0:amd64 which provides libjack-0.125 is to be removed.
libasound2-plugins:amd64 depends on libjack-jackd2-0 (>= 1.9.5~dfsg-14) | libjack-0.116; however:
Package libjack-jackd2-0:amd64 is to be removed.
Package libjack-0.116 is not installed.
Package libjack-jackd2-0:amd64 which provides libjack-0.116 is to be removed.
libavdevice57:amd64 depends on libjack-jackd2-0 (>= 1.9.10+20150825) | libjack-0.125; however:
Package libjack-jackd2-0:amd64 is to be removed.
Package libjack-0.125 is not installed.
Package libjack-jackd2-0:amd64 which provides libjack-0.125 is to be removed.
libasound2-plugins:amd64 depends on libjack-jackd2-0 (>= 1.9.5~dfsg-14) | libjack-0.116; however:
Package libjack-jackd2-0:amd64 is to be removed.
Package libjack-0.116 is not installed.
Package libjack-jackd2-0:amd64 which provides libjack-0.116 is to be removed.
mpv depends on libjack-jackd2-0 (>= 1.9.10+20150825) | libjack-0.125; however:
Package libjack-jackd2-0:amd64 is to be removed.
Package libjack-0.125 is not installed.
Package libjack-jackd2-0:amd64 which provides libjack-0.125 is to be removed.
libfluidsynth1:amd64 depends on libjack-jackd2-0 (>= 1.9.10+20150825) | libjack-0.125; however:
Package libjack-jackd2-0:amd64 is to be removed.
Package libjack-0.125 is not installed.
Package libjack-jackd2-0:amd64 which provides libjack-0.125 is to be removed.
gstreamer1.0-plugins-good:amd64 depends on libjack-jackd2-0 (>= 1.9.10+20150825) | libjack-0.125; however:
Package libjack-jackd2-0:amd64 is to be removed.
Package libjack-0.125 is not installed.
Package libjack-jackd2-0:amd64 which provides libjack-0.125 is to be removed.
libavdevice57:amd64 depends on libjack-jackd2-0 (>= 1.9.10+20150825) | libjack-0.125; however:
Package libjack-jackd2-0:amd64 is to be removed.
Package libjack-0.125 is not installed.
Package libjack-jackd2-0:amd64 which provides libjack-0.125 is to be removed.

(Reading database … 276144 files and directories currently installed.)
Removing libjack-jackd2-0:amd64 (1.9.12~dfsg-2) …

psychtoolbox==3.0.16

I did a

pip uninstall psychtoolbox

and I am now able to run the demo Stroop experiment.

pip install psychtoolbox

Collecting psychtoolbox
Downloading psychtoolbox-3.0.16-cp36-cp36m-manylinux2010_x86_64.whl (2.0 MB)
|████████████████████████████████| 2.0 MB 3.2 MB/s
Requirement already satisfied: numpy>=1.7 in /home/mhough/anaconda3/envs/psychopy/lib/python3.6/site-packages (from psychtoolbox) (1.19.1)
Installing collected packages: psychtoolbox
Successfully installed psychtoolbox-3.0.16

Unfortunately, this returns me to the original fatal crash even though I have the prerequisite libraries installed. I am not sure if there is an additional step I can do to fix psychtoolbox or if it requires an updated pip package.

It would be good to know if there is no solution if I can then reinstall my libjack-jackd2-0.

Thanks in advance for your time and consideration.