2020-02-07 20:01:42 +00:00
|
|
|
# Supported Python versions
|
|
|
|
|
|
2026-11-15 20:26:49 +00:00
|
|
|
Galaxy's core functionality is currently supported on Python **>=3.11** .
|
2020-02-07 20:01:42 +00:00
|
|
|
|
2020-02-19 16:09:12 +00:00
|
|
|
If Galaxy complains about the version of Python you are using:
|
2020-02-07 20:01:42 +00:00
|
|
|
|
2020-02-19 16:09:12 +00:00
|
|
|
1. Completely remove the Python virtualenv used by Galaxy (which can be
|
|
|
|
|
configured with the `GALAXY_VIRTUAL_ENV` environment variable and defaults to
|
|
|
|
|
`.venv`), e.g. with: `rm -rf /path/to/galaxy/.venv`
|
2020-02-07 20:01:42 +00:00
|
|
|
|
2020-02-19 16:09:12 +00:00
|
|
|
2. If you were using a Python from a conda environment (which can be configured
|
|
|
|
|
with the `GALAXY_CONDA_ENV` environment variable and defaults to `_galaxy_`),
|
|
|
|
|
remove it, e.g. with: `conda env remove -n _galaxy_`
|
2020-02-07 20:01:42 +00:00
|
|
|
|
2020-02-19 16:09:12 +00:00
|
|
|
3. Let Galaxy know which Python to use in one of the following methods:
|
2020-02-07 20:01:42 +00:00
|
|
|
|
2020-02-19 16:09:12 +00:00
|
|
|
- If you want to use Python from conda, just activate the `base` environment
|
|
|
|
|
and Galaxy will create a new conda environment for itself.
|
|
|
|
|
- Otherwise:
|
|
|
|
|
1. Make sure a supported version of Python is installed.
|
|
|
|
|
2. Verify that the Python interpreter you want to use is first in the
|
2025-08-27 19:18:20 +01:00
|
|
|
output of `which -a python3 python`. If this is not the case,
|
2025-08-27 16:30:39 +01:00
|
|
|
execute: `export GALAXY_PYTHON=/path/to/python`
|
2020-02-19 16:09:12 +00:00
|
|
|
|
2020-02-26 11:02:24 +01:00
|
|
|
4. Remove compiled mako templates when upgrading from Python 2:
|
|
|
|
|
```sh
|
|
|
|
|
% rm -rf /path/to/galaxy/database/compiled_templates/
|
|
|
|
|
```
|
2026-06-14 13:12:07 +00:00
|
|
|
These templates will be regenerated automatically when starting Galaxy.
|
2020-02-26 11:02:24 +01:00
|
|
|
|
|
|
|
|
5. Start Galaxy again.
|
2020-02-07 20:01:42 +00:00
|
|
|
|
|
|
|
|
N.B. If you have compiled your own Python interpreter from source, please ensure
|
|
|
|
|
that the `ssl`, `sqlite3`, `curses` and `bz2` modules were built and can be
|
|
|
|
|
imported after installation. These "extra" modules are built at the end of the
|
|
|
|
|
compilation process and are required by the Galaxy framework. If building on
|
|
|
|
|
Linux, you may need to install the appropriate `-dev` packages for OpenSSL and
|
|
|
|
|
Bzip2. You may also need to build Python with shared libraries
|
|
|
|
|
(`--enable-shared`).
|