Supported Python versions¶
Galaxy’s core functionality is currently supported on Python >=3.6 .
If Galaxy complains about the version of Python you are using:
Completely remove the Python virtualenv used by Galaxy (which can be configured with the
GALAXY_VIRTUAL_ENVenvironment variable and defaults to
.venv), e.g. with:
rm -rf /path/to/galaxy/.venv
If you were using a Python from a conda environment (which can be configured with the
GALAXY_CONDA_ENVenvironment variable and defaults to
_galaxy_), remove it, e.g. with:
conda env remove -n _galaxy_
Let Galaxy know which Python to use in one of the following methods:
If you want to use Python from conda, just activate the
baseenvironment and Galaxy will create a new conda environment for itself.
Make sure a supported version of Python is installed.
Verify that the Python interpreter you want to use is first in the output of
which -a python3 python(or
which -a pythonif you are using Galaxy <=19.09). If this is not the case:
If you are using Galaxy >= 20.01, just execute:
If instead you are using an older version of Galaxy, you can manipulate your shell’s
PATHvariable to place the correct version first. This can be done for just Python by creating a new directory, adding a symbolic link to
pythonin there, and putting that directory at the front of
% mkdir ~/galaxy-python % ln -s /path/to/python ~/galaxy-python/python % export PATH=~/galaxy-python:$PATH
Remove compiled mako templates when upgrading from Python 2:
% rm -rf /path/to/galaxy/database/compiled_templates/
These templated will be regenerated automatically when starting Galaxy.
Start Galaxy again.
N.B. If you have compiled your own Python interpreter from source, please ensure
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