| Reference | Downloads | Github

Cannot start Psychopy - No module named 'lib2to3'

Whenever I try to start Psychopy, I get the following error:

$ psychopy
Traceback (most recent call last):
  File "/home/local/ADF/brookshg/.local/bin/psychopy", line 7, in <module>
    from import main
  File "/home/local/ADF/brookshg/.local/lib/python3.6/site-packages/psychopy/", line 48, in <module>
    from import useVersion, ensureMinimal
  File "/home/local/ADF/brookshg/.local/lib/python3.6/site-packages/psychopy/tools/", line 18, in <module>
    from psychopy import logging, tools, web, constants
  File "/home/local/ADF/brookshg/.local/lib/python3.6/site-packages/psychopy/", line 39, in <module>
    from past.builtins import basestring
  File "/home/local/ADF/brookshg/.local/lib/python3.6/site-packages/past/", line 88, in <module>
    from past.translation import install_hooks as autotranslate
  File "/home/local/ADF/brookshg/.local/lib/python3.6/site-packages/past/translation/", line 41, in <module>
    from lib2to3.pgen2.parse import ParseError
ModuleNotFoundError: No module named 'lib2to3'

I’ve completely uninstalled psychopy and reinstalled using the instructions for Anaconda here. I’m running Ubuntu 18.04.3 LTS.

I’ve tried installing lib2to3 using pip and conda, but neither of those can find this package. I’d appreciate any suggestions!

I’ve uninstalled everything I can find, deleted the conda environment, and used pip uninstall to remove everything connected with psychopy. After reinstalling, I get this error:

Traceback (most recent call last):
  File "/home/local/ADF/brookshg/anaconda3/envs/psypy3/bin/psychopy", line 8, in <module>
  File "/home/local/ADF/brookshg/anaconda3/envs/psypy3/lib/python3.6/site-packages/psychopy/app/", line 100, in main
  File "/home/local/ADF/brookshg/anaconda3/envs/psypy3/lib/python3.6/site-packages/psychopy/app/", line 22, in start_app
    from import PsychoPyApp
  File "/home/local/ADF/brookshg/anaconda3/envs/psypy3/lib/python3.6/site-packages/psychopy/app/", line 31, in <module>
    import wx
  File "/home/local/ADF/brookshg/.local/lib/python3.6/site-packages/wx/", line 17, in <module>
    from wx.core import *
  File "/home/local/ADF/brookshg/.local/lib/python3.6/site-packages/wx/", line 12, in <module>
    from ._core import *
ImportError: /home/local/ADF/brookshg/anaconda3/envs/psypy3/bin/../lib/ undefined symbol: pango_font_description_set_variations

This seems like a pretty low-level error, and I haven’t been able to make any headway on fixing it.

I fixed this by removing my psychopy Anaconda environment, and reinstalling using the default python version (3.7) instead of python 3.6.

So this breaks: conda create -n psypy3 python=3.6
But this works: conda create -n psypy3