This should actually work properly if you install the dependencies via
the Manage dependencies page in the admin menu or if you install the tool via the tool shed.
This translates more or less to the following conda command:
```
$ conda create -n mulled-v1xxxxxxxx python=2.7 biopython=1.65 -c iuc -c bioconda -c conda-forge -c defaults
Fetching package metadata ...................
Solving package specifications: .

Package plan for installation in environment /Users/mvandenb/miniconda3/envs/test_resolution:

The following NEW packages will be INSTALLED:

    biopython:       1.65-np19py27_0
    ca-certificates: 2018.1.18-0          conda-forge
    certifi:         2018.1.18-py27_0     conda-forge
    intel-openmp:    2018.0.0-h8158457_8
    libgfortran:     3.0.1-h93005f0_2
    mkl:             2018.0.1-hfbd8650_4
    ncurses:         5.9-10               conda-forge
    numpy:           1.9.3-py27hb3dd696_3
    openssl:         1.0.2n-0             conda-forge
    pip:             9.0.1-py27_1         conda-forge
    python:          2.7.14-4             conda-forge
    readline:        7.0-0                conda-forge
    setuptools:      38.5.1-py27_0        conda-forge
    sqlite:          3.20.1-2             conda-forge
    tk:              8.6.7-0              conda-forge
    wheel:           0.30.0-py27_2        conda-forge
    zlib:            1.2.11-0             conda-forge
```

So given a recent conda (latest version should work) and the correct channel order
it should work.

Best,
Marius

On 5 March 2018 at 17:39, Peter Cock <p.j.a.cock@googlemail.com> wrote:
Tricky, as I understand it the conda python packages are specific to
the conda version of Python - in this case Python 3 not 2.

It might actually be simpler to fix pal_finder/pal_filter.py to cope
with Python 3 - is the code online somewhere, I could probably cast an
eye over it.

Peter

On Mon, Mar 5, 2018 at 4:28 PM, Peter Briggs
<peter.briggs@manchester.ac.uk> wrote:
> Hello
>
> I'm in the process of updating our local Galaxy tools to use conda dependency resolution, and I've hit a snag with a tool that requires Python 2.7 along with the Python 2.7-compatible version of Biopython 1.65.
>
> I'd assumed that if I explicitly used the following in the "requirements" section of the tool XML:
>
>     <requirement type="package" version="2.7">python</requirement>
>     <requirement type="package" version="1.65">biopython</requirement>
>
> that the biopython install would respect the specified Python version, and that the command execution environment would be based on Python 2.7.
>
> But in practice it appears I'm getting Python3 as I'm seeing errors:
>
>       File "XXXXXXXX/galaxy-tools/tools/pal_finder/pal_filter.py", line 129
>         print "\n~~~~~~~~~~"
>                            ^
>     SyntaxError: Missing parentheses in call to 'print'
>
> This is happening both when running the tool tests via the planemo tests, and also when I install the tool from a local toolshed instance.
>
> Can anyone advise how to coerce the Python dependencies to be 2.7-compatible?
>
> Thanks in advance for any help,
>
> Best wishes
>
> Peter
>
> --
> Peter Briggs peter.briggs@manchester.ac.uk
> Bioinformatics Core Facility University of Manchester
> B.1083 Michael Smith Bldg Tel: (0161) 2751482
>
> ___________________________________________________________
> Please keep all replies on the list by using "reply all"
> in your mail client.  To manage your subscriptions to this
> and other Galaxy lists, please use the interface at:
>   https://lists.galaxyproject.org/
>
> To search Galaxy mailing lists use the unified search at:
>   http://galaxyproject.org/search/
___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  https://lists.galaxyproject.org/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/