This is for those who might be having problems installing PsychoPy 2023.1.1 on Ubuntu 22.04. After trying nearly all the options suggested on forums and the PsychoPy install page and failing, I finally got a fully functional PsychoPy install using the following steps:
- create a virtual env (12. Virtual Environments and Packages — Python 3.11.3 documentation)
- set the python version to 3.8 for the virtual env
virtualenv --python=“/usr/bin/python3.8” “/path/to/new/virtualenv/” (3.8 must be installed) - activate the virtual env source env/bin/activate
- download PsychoPy-2023.1.1.zip from GitHub (Releases · psychopy/psychopy · GitHub)
- extract PsychoPy from zip file
- pip install wx wheel for Ubuntu version (Index of /wxPython4/extras/linux/gtk3) I used pip install wxPython-4.1.1-cp38-cp38-linux_x86_64.whl
- cd to the PsychoPy folder and use command: ./setup.py build
- when build completes, use command: ./setup.py install
- pip install any missing modules causing install error. Fix with: python -m pip install “missing module” In general, for any failure due to a missing module during the install, install the missing module and then ./setup.py install again
Note: you may need to install wxpython (wxPython · PyPI) or other modules - just follow the error messages