local galaxy conda not working good

Hello,

I have set up galaxy, but conda is not working.

In my galaxy.yml I have:

conda_exec: /opt/anaconda3/bin/conda
conda_auto_install: true

When I go to the admin page and manage dependencies and try to install one nothing happens. Also no errors. When I let galaxy install conda for me everything works.

1 Like

Is there a specific reason you are not using that Conda?

This administrator documentation explains how Conda is configured: Conda for Tool Dependencies — Galaxy Project 23.1.1.dev0 documentation

My guess is that you are running Galaxy in a virtualenv and the “Galaxy user” doesn’t have access to your locally installed Conda. Life will be much easier to just use the one Galaxy installs.

Thanks for the answer, I think I am using the virtualenv from conda now but I suppose it does not matter if you use this one or the “original” python one. Galaxy does have access, and even if it had not I was expecting an permission denied error. It worked this way before with virtualenv and a manual install, so I was hoping for a simple easy fix answer. The specific reason to do it like this was that I wanted that the galaxy user can use conda but also other users on the system. Also that worked before with making a conda group.

For now it works, I could even do conda_prefix: /opt/anaconda3

Maybe some one can confirm if I should see no error or a permission denied error if it had to do with access and rights.

Another question, I could make a new post but maybe things are related. Before when I setted up galaxy and did which python in a script it showed me that galaxy was using the python from my $PATH. Now it is showing me galaxy/galaxy/.venv/bin/python. I am not starting galaxy from a conda base environment.

1 Like

Few questions, then we can ask the developers for advice:

  1. What Galaxy version were you running before? Did you initially start it up in a virtualenv? (example)

  2. What Galaxy version are you running now? New install or did you upgrade the prior version? If a new install, was it initially started up in a virtualenv?

  3. What is your OS for each install?

Starting up Galaxy with the Conda version of python will cause problems. Some issues do not show up until a display application is used (“Charts” functions are one example I know of). I suppose tool installs could be impacted as well but that is one of the items we can confirm with the developers. There are a few ways to do this. The example in item #1 above is the simplest but more complex configurations are certainly possible.

Reference: Releases (19.05 is the latest): https://docs.galaxyproject.org/en/master/releases/index.html

1 Like
  1. Galaxy 19.01. I did not initially start it up in a virtualenv like the example, I let the run.sh script do that for me and I thought that was the same (If you do everything without conda). This was a different computer.

2.Galaxy 19.05. A fresh clone, no upgrade. I did not initially start it up in a virtualenv like the example, I let the run.sh script do that for me and I thought that was the same (If you do everything without conda).

  1. ubuntu 18.10

I just Create a new 18.10 ubuntu in virtualbox to test some options.

test1. Install git, install python2,create galaxy user, download galaxy, run galaxy.
When I execute a bash script containing which python and run the tool I get /galaxy/.venv/bin/python

test2. download galaxy, install virtualenv, create .venv, run galaxy (like the example).
Same result as test1.

I can overcome this by giving the full path of the python that I want, and 99,99% I wil use the python of a conda environment anyways but this behavior that I do not expect worry’s me for the stability in the future.

test3. For this test I use the galaxy of test2. But I let galaxy install conda for me in the folder /opt/conda/anaconda3. The /opt/conda folder has full permission (chmod 777). I test if conda works by installing and uninstalling dependencies in the manage dependencies screen.
Galaxy and conda work so all good, except that it is still not using the PATH of my system.

test4 I use the galaxy of test 3 but give full rights (chmod -R 777 /opt/conda) to conda.
Everything still works

test5 this time I change the owner of all the files in /opt/conda. (chown -R otheruser /opt/conda)
Everything still works

test6 For this test I will use the galaxy of test1 but I install conda manually in /opt/conda/anaconda3_2 with user galaxy. If I install a dependency conda is working and is actually installing the dependencies. Also if I do /opt/conda/anaconda3_2/bin/conda env list I see them but galaxy can not find them after installation. In my terminal after installation in see many Dependency not found errors. I tried to set conda_prefix: /opt/conda/anaconda3_2/envs but this also did not work.

Summary:
Galaxy is not using the PATH of my system.
Galaxy can use my manually installed conda but after installing a dependency I get many Dependency not found errors