# Problems after upgrading Ubuntu to 22

**URL:** <https://help.galaxyproject.org/t/problems-after-upgrading-ubuntu-to-22/8544>\
**Category:** Uncategorized\
**Tags:** galaxy-local\
**Created:** [August 29, 2022, 5:14am UTC](https://help.galaxyproject.org/t/problems-after-upgrading-ubuntu-to-22/8544 "2022-08-29T05:14:58Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![cass](https://avatars.discourse-cdn.com/v4/letter/c/ecccb3/32.png) [@cass](https://help.galaxyproject.org/u/cass)\
**Post date:** [August 29, 2022, 5:14am UTC](https://help.galaxyproject.org/t/problems-after-upgrading-ubuntu-to-22/8544/1 "2022-08-29T05:14:58Z")

</div>

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 run.sh 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 = [  
‘/usr/lib/python39.zip’,  
‘/usr/lib/python3.9’,  
‘/usr/lib/lib-dynload’,  
]  
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?

Best

Peter

---

<div class="post-metadata">

**Author:** ![gallardoalba](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/gallardoalba/32/1903_2.png) [@gallardoalba](https://help.galaxyproject.org/u/gallardoalba)\
**Post date:** [August 29, 2022, 12:07pm UTC](https://help.galaxyproject.org/t/problems-after-upgrading-ubuntu-to-22/8544/2 "2022-08-29T12:07:14Z")

</div>

> [@cass](#):
>
> Fatal Python error: init\_fs\_encoding: failed to get the Python codec of the filesystem encoding

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

```auto
unset PYTHONPATH
unset PYTHONHOME

```

Regards

---

<div class="post-metadata">

**Author:** ![cass](https://avatars.discourse-cdn.com/v4/letter/c/ecccb3/32.png) [@cass](https://help.galaxyproject.org/u/cass)\
**Post date:** [August 29, 2022, 9:34pm UTC](https://help.galaxyproject.org/t/problems-after-upgrading-ubuntu-to-22/8544/3 "2022-08-29T21:34:04Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![FelixSchmidmeir](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/felixschmidmeir/32/3821_2.png) [@FelixSchmidmeir](https://help.galaxyproject.org/u/FelixSchmidmeir)\
**Post date:** [November 14, 2022, 9:46pm UTC](https://help.galaxyproject.org/t/problems-after-upgrading-ubuntu-to-22/8544/4 "2022-11-14T21:46:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jennaj](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/jennaj/32/27_2.png) [@jennaj](https://help.galaxyproject.org/u/jennaj)\
**Post date:** [November 16, 2022, 10:40pm UTC](https://help.galaxyproject.org/t/problems-after-upgrading-ubuntu-to-22/8544/5 "2022-11-16T22:40:00Z")

</div>

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](https://docs.galaxyproject.org/en/master/releases/index.html).

Matrix [You're invited to talk on Matrix](https://matrix.to/#/!rfLDbcWEWZapZrujix:gitter.im/%24iHbxvKLt9lVJ4OpF3Di5P-beqxmrUmhEdG_2Q96Nm-w?via=gitter.im&via=matrix.org)

Gitter [galaxyproject/admins - Gitter](https://gitter.im/galaxyproject/admins?at=637565e20513b562e8b3740e)

---

<div class="post-metadata">

**Author:** ![nsoranzo](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/nsoranzo/32/77_2.png) [@nsoranzo](https://help.galaxyproject.org/u/nsoranzo)\
**Post date:** [November 16, 2022, 10:59pm UTC](https://help.galaxyproject.org/t/problems-after-upgrading-ubuntu-to-22/8544/6 "2022-11-16T22:59:26Z")

</div>

Can you try by following the instructions in [Supported Python versions — Galaxy Project 22.05.1 documentation](https://docs.galaxyproject.org/en/master/admin/python.html) ?  
In particular, start by removing the existing virtual environment (by default the `.venv` subdirectory).

---

<div class="post-metadata">

**Author:** ![jennaj](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/jennaj/32/27_2.png) [@jennaj](https://help.galaxyproject.org/u/jennaj)\
**Post date:** [May 8, 2026, 1:59am UTC](https://help.galaxyproject.org/t/problems-after-upgrading-ubuntu-to-22/8544/7 "2026-05-08T01:59:40Z")

</div>


