Question: Error installing Galaxy locally with Conda environment
gravatar for lucasperes95
12 months ago by
lucasperes950 wrote:

Hi everyone,

I'm trying to install a local instance of Galaxy in my Ubuntu using Conda as the dependency framework. I have been following the instructions from the Galaxy's documentation to install it with pinned dependencies, so I executed the following steps:

Create a conda env with Python 2.7 pointing to the Bioconda channel:

conda create -n galaxy python=2.7 -c bioconda

Getting Galaxy from its repository:

git clone -b release_17.09

Activating the new environment:

source activate galaxy

From within the environment, I try to run Galaxy:


But I get the following error:

Initializing config/migrated_tools_conf.xml from migrated_tools_conf.xml.sample
Initializing config/shed_tool_conf.xml from shed_tool_conf.xml.sample
Initializing config/shed_tool_data_table_conf.xml from shed_tool_data_table_conf.xml.sample
Initializing config/shed_data_manager_conf.xml from shed_data_manager_conf.xml.sample
Initializing tool-data/shared/ucsc/builds.txt from builds.txt.sample
Initializing tool-data/shared/ucsc/manual_builds.txt from manual_builds.txt.sample
Initializing static/welcome.html from welcome.html.sample
Running virtualenv with interpreter /home/lucas/anaconda3/envs/galaxy/bin/python2.7
New python executable in /home/lucas/galaxy/.venv/bin/python2.7
Also creating executable in /home/lucas/galaxy/.venv/bin/python
Installing setuptools, pip, wheel...
  Complete output from command /home/lucas/galaxy/.venv/bin/python2.7 - setuptools pip wheel:
  Traceback (most recent call last):
  File "<stdin>", line 7, in <module>
  File "/home/lucas/anaconda3/lib/python3.6/site-packages/virtualenv_support/pip-9.0.1-py2.py3-none-any.whl/pip/", line 5, in <module>
  File "/home/lucas/anaconda3/envs/galaxy/lib/python2.7/logging/", line 26, in <module>
    import sys, os, time, cStringIO, traceback, warnings, weakref, collections
  File "/home/lucas/anaconda3/envs/galaxy/lib/python2.7/", line 14, in <module>
    from _weakref import (
ImportError: cannot import name _remove_dead_weakref

...Installing setuptools, pip, wheel...done. Traceback (most recent call last): File "/home/lucas/anaconda3/lib/python3.6/site-packages/", line 2328, in <module> main() File "/home/lucas/anaconda3/lib/python3.6/site-packages/", line 713, in main symlink=options.symlink) File "/home/lucas/anaconda3/lib/python3.6/site-packages/", line 945, in create_environment download=download, File "/home/lucas/anaconda3/lib/python3.6/site-packages/", line 901, in install_wheel call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT) File "/home/lucas/anaconda3/lib/python3.6/site-packages/", line 797, in call_subprocess % (cmd_desc, proc.returncode)) OSError: Command /home/lucas/galaxy/.venv/bin/python2.7 - setuptools pip wheel failed with error code 1

The Galaxy's documentation says the following about Conda:

Conda and virtualenv are incompatible. However, Conda provides its own environment separation functionality in the form of Conda environments. Starting Galaxy with Conda Python will cause --skip-venv to be implicitly set, and the currently active Conda environment will be used to install Galaxy framework dependencies instaead. Be sure to create and activate a Conda environment for Galaxy prior to installing packages and/or starting Galaxy.

Which I believe I followed as I should, so the problem is clearly about dependencies, but I couldn't figure out how to solve only looking at the error message. Here is what the doc says about pinned dependencies:

You may choose to install Galaxy’s dependencies either at their pinned versions using pip or unpinned using a combination of conda and pip. When running under Conda, pip is not replaced with Galaxy pip, so installing pinned dependencies will require compilation, will be slower and requires having those dependencies’ build-time dependencies installed [...]

Thank you in advance for any help! :)

galaxy • 728 views
ADD COMMENTlink written 12 months ago by lucasperes950
gravatar for Devon Ryan
12 months ago by
Devon Ryan1.9k
Devon Ryan1.9k wrote:

Maybe make your life easier and use the docker version of Galaxy. It uses conda for tool dependency resolution and you don't have to bother with all of the setup.

ADD COMMENTlink written 12 months ago by Devon Ryan1.9k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 169 users visited in the last hour