Problems after upgrading Ubuntu to 22

Hi everyone,

I just upgraded my Ubuntu 20 to 22, which obviously included an upgrade from python 3.9 to 3.10. However, when I try to start Galaxy using the script, I now receive the following error:

Activating virtualenv at .venv
Could not find platform independent libraries
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to [:<exec_prefix>]
Python path configuration:
PYTHONHOME = (not set)
PYTHONPATH = (not set)
program name = ‘python’
isolated = 0
environment = 1
user site = 1
import site = 1
sys._base_executable = ‘/home/michael/Galaxy/galaxy/.venv/bin/python’
sys.base_prefix = ‘/usr’
sys.base_exec_prefix = ‘/usr’
sys.platlibdir = ‘lib’
sys.executable = ‘/home/michael/Galaxy/galaxy/.venv/bin/python’
sys.prefix = ‘/usr’
sys.exec_prefix = ‘/usr’
sys.path = [
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named ‘encodings’

Current thread 0x00007f09efe2a000 (most recent call first):

Can anyone help me how to fix that?



Hi @cass,
could you try to remove the PYTHONPATH and PYTHONHOME variables?



Thanks for the input! However, this does not change the error. I have tried to install python 3.9, but it just gives me errors anyway…

Did you find a solution for this issue? I am having exactly the same problem

1 Like

Hi @FelixSchmidmeir

I’ve cross-posted your question over to the admin’s chat. They may reply here or there, and feel free to join the chat. Minimally, sharing the version of Galaxy you are running would be helpful. 22.05 is the most current stable release and is recommended for everyone. releases/index.

Matrix You're invited to talk on Matrix

Gitter galaxyproject/admins - Gitter

Can you try by following the instructions in Supported Python versions — Galaxy Project 22.05.1 documentation ?
In particular, start by removing the existing virtual environment (by default the .venv subdirectory).

1 Like