Conda detected but not work


I work on galaxy dev, and I want use conda with it.
My tools I want use are in python 2.7 this is why I need to configure conda.
I want create a docker version of this galaxy.
I have a external postgress server already configured, this is why I don’t want use the official docker version of galaxy.
My conda version are the last version of the official repo: stable main

My configuration:

tool_dependency_dir: database/dependencies
dependency_resolvers_config_file: config/dependency_resolvers_conf.xml (I use the original sample)
conda_prefix: /home/galaxy/.conda
conda_exec: /opt/conda/bin/conda (I have a symbolic link: ln -s /opt/conda/bin /home/galaxy/.conda/)
conda_auto_install: true
conda_auto_init: true

The problem:
After the installation galaxy work fine, and I can use external commands of conda.

The first problem are a problem of installation of dependency. Galaxy use this command:
/opt/conda/bin/conda create -y --quiet --override-channels --channel conda-forge --channel bioconda --channel iuc --channel defaults --channel R --name mulled-v1-5b73db27209dd7e83d26bd4dedeadbcf356c9297c08644dec23df66a734a236c python=2.7 scipy matplotlib Pillow reportlab tk ConfigParser
But we obtain no output, and the conda env are not create and when I use it with the galaxy user, it create the environment. I don’t understand why.
After the creation of the environment galaxy detect it and want use it. But, when it activate it, the environment are not correctly initialize and I obtain this error:
Traceback (most recent call last):
File “/home/galaxy/tools/ngs-qc/”, line 11, in
import gviewer
File “/home/galaxy/tools/ngs-qc/”, line 11, in
import ConfigParser
ModuleNotFoundError: No module named ‘ConfigParser’

And when I check the version: 3.6.13 | packaged by conda-forge
This is the version of my galaxy env, not the version for my tool.

What do you think I have to change in my config ?
In advance, thank you for your help.

1 Like

Hi @studyfranco

Please see:

  1. Dependency Resolvers in Galaxy — Galaxy Project 21.01 documentation
  2. Conda for Tool Dependencies — Galaxy Project 21.01 documentation
  3. Containers for Tool Dependencies — Galaxy Project 21.01 documentation
  4. Tools in GalaxyPlanemo can help with debugging during tool development

This isn’t an exact answer, so I asked the IUC for feedback. They may reply here or at Gitter. Please feel free to join into the conversation there: galaxy-iuc/iuc - Gitter


I have already read all the documentation. I think galaxy use conda beacause it have its own environment and when it launch the script, it use a modify tools with conda commands:

[ "$(basename “CONDA_DEFAULT_ENV")" = "(basename ‘/home/galaxy/.conda/envs/mulled-v1-5b73db27209dd7e83d26bd4dedeadbcf356c9297c08644dec23df66a734a236c’)” ] || {
while [ $COUNT -lt MAX_TRIES ]; do . '/home/galaxy/.conda/bin/activate' '/home/galaxy/.conda/envs/mulled-v1-5b73db27209dd7e83d26bd4dedeadbcf356c9297c08644dec23df66a734a236c' > conda_activate.log 2>&1 if [ ? -eq 0 ];then
if [ $COUNT -eq $MAX_TRIES ];then
echo “Failed to activate conda environment! Error was:”
cat conda_activate.log
exit 1
sleep 10s
} ;

I use conda in my own tools. In python, I use popen with this commands : . $CONDA_PREFIX/etc/profile.d/ && conda activate env && mycommand

Followup: galaxy-iuc/iuc - Gitter