

Install pyenv don’t forget the Python build dependencies On a machine solely used for PP this may not be an issue, but overall it’s a risk better to avoid.

As I mentioned, it’s best not to change that, because it may cause trouble with system packages that expect a particular version. The biggest difference is that I didn’t use or touch the system Python.

You seem to have experience with installing PP so do let me know if you notice any problems. Yesterday I successfully(?) installed PP on Ubuntu 22.04, and my method differs a little bit from yours so let me present it. The rest is not significantly different from OP. TL DR: I used pyenv to install a Python version separate from the system Python. PS: I’ve spotted a little glitch in the window title bar when running PsychoPy using Wayland. Have fun using PsychoPy 2022.1.4 in Ubuntu 22.04!

You may need to restart your computer before running Psychopy, but that is pretty much itĭowngrading to Python 3.9 is not exactly what I initially intended, but it works! Paste in the following text to that file and save - nice - rtprio - memlock unlimited Raise the priority of the experiment processĬreate a nf file using gedit: Pip3.9 install -v -user -no-cache-dir -force-reinstall wxPython This takes around 35 minutes in my core i7 5th gen machine - adjust your expectations accordingly To avoid having to logout and back in again, run the line below for this alteration to take effect: … paste the line below at the end of it and save the file. So, before installing anything using pip, we need this: We will need to use pip to install packages specifically for Python 3.9. Sudo apt install python3-pip make gcc libgtk-3-dev libgstreamer-gl1.0-0 python3-gst-1.0 libglib2.0-dev ubuntu-restricted-extras python-dev-is-python3 bison autoconf libtool-bin swig libpulse-dev libusb-1.0-0-dev portaudio19-dev libasound2-dev freeglut3 freeglut3-dev libgl1-mesa-dev libglu1-mesa-dev libgstreamer-plugins-base1.0-dev libgtk-3-dev libjpeg-dev libnotify-dev libsdl2-dev libsm-dev libtiff-dev libwebkit2gtk-4.0-dev libxtst-dev python3-testresources nodejs libsndfile1-dev libportmidi-dev liblo-dev curl Install Psychopy dependencies and some packages needed to compile wxPython: Install outdated psychopy from Ubuntu’s repository Now that we have our Python 3.9 installed, let’s move on As you can see, you can easily change it back to Python 3.10 if you need. Just to make sure, type python -version into your terminal and check if Python 3.9 appears, indicating it is in use system-wide. To manually choose Python 3.9, type the corresponding number assigned to it and press enter after running the line below: Sudo update-alternatives -install /usr/bin/python python /usr/bin/python3.10 1 Sudo update-alternatives -install /usr/bin/python python /usr/bin/python3.9 2
GEDIT PYTHON FILE TURN LINE NUMBERS ON HOW TO
A higher number means a higher priority - just to leave an explanation here, but this is not an essential step in this case, because I’ll show next how to manually enable a especific version system-wide. Now, we can assing a priority to each of our Python versions (3.9 and 3.10) and set Python 3.9 as the default. Sudo apt install -y python3.9 python3.9-venv python3.9-dev Install Python 3.9 and some additional packages Sudo add-apt-repository ppa:deadsnakes/ppa Sudo apt install -y software-properties-common So, the “solution” I found was to install Python 3.9, since they seem to like each other.įirst, let’s take care of the Python 3.9 part of the installationĪdd software-properties-common so we can easily manage the repositories / PPA we are going to use. Ubuntu 22.04 comes with Python 3.10 and I could not - for the life of me - make it work with PsychoPy 2022.1.4.
