Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'dict' object has no attribute 'split' #157

Closed
sebastian-luna-valero opened this issue Jul 26, 2017 · 7 comments
Closed

Comments

@sebastian-luna-valero
Copy link
Member

Hi,

I get an AttributeError exception when doing:

bioconda-utils build recipes config.yml --mulled-test --packages cgat-scripts

Full output is here

I think the error was caused after adding a pip dependency on my meta.yaml file, like

requirements:
   build:
      - python 3.5
      - pip
         - bx-python==0.7.3

Do you know why?

Best regards,
Sebastian

@daler
Copy link
Member

daler commented Jul 26, 2017

looks like you have an extra indentation on the bx-python line

@sebastian-luna-valero
Copy link
Member Author

sebastian-luna-valero commented Jul 26, 2017

Sorry, I meant:

requirements:
   build:
      - python 3.5
      - pip:
         - bx-python==0.7.3

I guess, I should rephrase my question. How can I included pypi deps in the meta.yaml?

It works in a conda environment file.

EDIT: This is what I want to install:
https://pypi.python.org/pypi/bx-python/0.7.3

@sebastian-luna-valero
Copy link
Member Author

@daler could you please let me know your thoughts on this issue?

@daler
Copy link
Member

daler commented Jul 27, 2017

Ah, sorry I misunderstood. Pip dependencies work in a conda env file but this is not supported (that I know of) by conda when building recipes. Anyway I think it's better to have checksummed downloads be the only input to a recipe rather than arbitrary pip packages.

For a recipe, any deps need to be in either defaults, conda-forge, or bioconda channels. But if you're looking specifically for bx-python, it's in bioconda (https://anaconda.org/bioconda/bx-python).

@sebastian-luna-valero
Copy link
Member Author

Thanks @daler

The thing is that our scripts depend on bx-python for certain tasks. We have ported our scripts from Py2 to Py3, but bx-python is not officially Py3 yet [1]. Therefore, the bioconda package is only Py2 [2]. However, we found that you can still pip install bx-python with Py3 and it does the job. Obviously this is a temporary solution until bx-python is fully ported to Py3.

On the other hand, I don't understand why pip dependencies are not supported when building recipes, if the version of the pip package is fixed. We need bx-python=0.7.3

Any suggestions?

[1] bxlab/bx-python#9
[2] bioconda/bioconda-recipes#1639

@daler
Copy link
Member

daler commented Jul 27, 2017

If you run conda-build on your recipe directly, you will get an error like:

Received dictionary as spec. Note that pip requirements are not supported
in conda-build meta.yaml.

Installing from pip is not supported by conda-build for building packages from recipes. It's only supported by conda when building environments from requirements files.

An individual recipe can install from pip (that's how pretty much all python packages in bioconda are built). If you want bx-python on py3, then you need a working recipe and package for bx-python on py3. You can try getting a py3 package to run and pass tests, and work with upstream as necessary to get that to work.

@sebastian-luna-valero
Copy link
Member Author

Thanks @daler

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants