Question: Force galaxy to use the python 2 version of a dependency of a new tool
0
gravatar for Thon deBoer
6 months ago by
Thon deBoer20
Thon deBoer20 wrote:

I am creating a new tool for galaxy based on the NEAT-genReads tool from Zachary Stephens and I am trying to define the dependencies.

The tool requires the matplotlib.pyplot library since it calls out this import statement:

import matplotlib.pyplot as mpl

I defined the dependency for the tool like this in the tool XML file:

<requirement type="package">matplotlib</requirement>

But when I look at the log files I see it installing Python version 3.6 instead of using the python 2 version that is need...

So, when the tool runs, it complains that it cannot find the correct module

Fatal error: Exit code 1 ()
Traceback (most recent call last):
  File "/opt/galaxy/tools/neat-genreads/utilities/genMutModel.py", line 10, in <module>
    import matplotlib.pyplot as mpl
ImportError: No module named matplotlib.pyplot

How do I force galaxy to install the python 2 version of matplotlib?

ADD COMMENTlink modified 6 months ago by Jennifer Hillman Jackson25k • written 6 months ago by Thon deBoer20
0
gravatar for Jennifer Hillman Jackson
6 months ago by
United States
Jennifer Hillman Jackson25k wrote:

Hello,

Using Conda, instead of dependency packages, is the best practice for tool development now and any Galaxy server might need to have more than one version of a dependency installed.

Resources:

Thanks! Jen, Galaxy team

ADD COMMENTlink written 6 months ago by Jennifer Hillman Jackson25k

UH?! By using the requirement tag i AM using conda, no? Conda is just one of the dependency resolvers I understand...

I am actually using PLANEMO (on the VM) and that is where I see that CONDA is installing the python 3.6 version of all the dependencies

ADD REPLYlink written 6 months ago by Thon deBoer20

Just checked, and indeed matplotlib is installed using CONDA...

genMutModel     /home/ubuntu/miniconda3/envs/mulled-v1-808d181c256ea1be661871e558eb70bf5d9047a0855ff85f21331747f4819086     numpy   1.9.1   Conda   True    
        /home/ubuntu/miniconda3/envs/mulled-v1-808d181c256ea1be661871e558eb70bf5d9047a0855ff85f21331747f4819086     matplotlib  None    Conda   True
ADD REPLYlink written 6 months ago by Thon deBoer20
Please log in to add an answer.

Help
Access

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