Need help installing Galaxy: "ModuleNotFoundError: No module named 'lib2to3'"

Hi all,

I’m a student research assistant trying to install a personal Galaxy instance on my mentor’s desktop computer. The computer is running a fresh installation of Ubuntu Desktop 24.04 LTS. Pip, wheel and Python 3.12.3-dev are also installed. I’m attempting to execute run.sh according to the Get Galaxy instructions.

After celery, celery-beat, and gunicorn start, they keep trying to run from lib2to3.refactor import RefactoringTool, which returns the error ModuleNotFoundError: No module named 'lib2to3'. Eventually all 3 enter a fatal state because of those errors and Galaxy is unable to properly start. I found with some Googling that lib2to3 was removed in Python 3.10, and because of that I’m not sure how to resolve these errors. Here is the last part of the terminal output for reference:

How do I troubleshoot my Galaxy installation?

Hi @morganam

Module not found

This means that there is a dependency problem.

The Get Galaxy instructions are highly simplified as a quick guide. Try these guides instead.

Hello Mr. Morganam,
I faced the same problem and I have just solved it !
Here is what you need to do in your Ubuntu terminal:

sudo apt install 2to3

and it will install the needed library

1 Like