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

cannot install pybedtools as part of requirements.txt #116

Closed
lbergelson opened this issue Oct 3, 2014 · 3 comments
Closed

cannot install pybedtools as part of requirements.txt #116

lbergelson opened this issue Oct 3, 2014 · 3 comments

Comments

@lbergelson
Copy link

If I have pybedtools specified in my requirements.txt I get an error.

here is an example requirements.txt

Cython==0.20
pybedtools==0.6.6

running

pip install -r requirements.txt

results in

Downloading/unpacking Cython==0.20 (from -r requirements.txt (line 1))
  Downloading Cython-0.20.tar.gz (2.6MB): 2.6MB downloaded
  Running setup.py (path:/Users/louisb/tmp/testing_venvs/venv_req/build/Cython/setup.py) egg_info for package Cython

    warning: no files found matching '*.pyx' under directory 'Cython/Debugger/Tests'
    warning: no files found matching '*.pxd' under directory 'Cython/Debugger/Tests'
    warning: no files found matching '*.h' under directory 'Cython/Debugger/Tests'
    warning: no files found matching '*.pxd' under directory 'Cython/Utility'
Downloading/unpacking pybedtools==0.6.6 (from -r requirements.txt (line 2))
  Downloading pybedtools-0.6.6.tar.gz (19.0MB): 19.0MB downloaded
  Running setup.py (path:/Users/louisb/tmp/testing_venvs/venv_req/build/pybedtools/setup.py) egg_info for package pybedtools

        ==================================================

        Please install Cython (http://cython.org/),
        which is required to build pybedtools. Usually
        you can do:

            pip install -U cython

        or

            easy_install -U cython

        ==================================================

    Complete output from command python setup.py egg_info:


    ==================================================



    Please install Cython (http://cython.org/),

    which is required to build pybedtools. Usually

    you can do:



        pip install -U cython



    or



        easy_install -U cython



    ==================================================

If I install each line individually it succeeds. This seems to be a result of a malformed setup.py. See pypa/pip#25 for more information on the root cause. I've filed an issue with pip about this as well, pypa/pip#2083, but I suspect the response their is going to be "it's a pybedtools issue"

@daler
Copy link
Owner

daler commented Oct 3, 2014

Hmm, I should probably include the C++ source files and only run Cython if the user has it installed.

pandas has a pretty extensive setup.py that might have some useful pieces: https://github.com/pydata/pandas/blob/master/setup.py.

Cython has more options available now than it did when pybedtools' setup.py was first written; this may be a more streamlined approach:
http://docs.cython.org/src/userguide/source_files_and_compilation.html

I will look into this more as I get time. Thanks for reporting this.

@lbergelson
Copy link
Author

Thanks for looking into it!

I think it has to do with pip's 2-step walkover of the setup.py when running with -r. The first time it's just gathering requirement info by running setup.py and examing the installation_requires field. (or something along those lines, I have only a very vague and possibly incorrect understanding of what's going on) In this case, the setup script crashes because of the cython check.

If the cython check is moved to be an annotated installation requirement instead of being run any time setup.py is, then the problem could probably be avoided.

alexcoman added a commit to alexcoman/bcbio-nextgen-vm that referenced this issue May 31, 2015
One of the bcbio-nextgen requirements is pybedtools and this
library cannot be part of a requirements.txt file.

More information can be found on the following links:
    - pypa/pip#2083
    - daler/pybedtools#116
alexcoman added a commit to bcbio/bcbio-nextgen-vm that referenced this issue Aug 17, 2015
One of the bcbio-nextgen requirements is pybedtools and this
library cannot be part of a requirements.txt file.

More information can be found on the following links:
    - pypa/pip#2083
    - daler/pybedtools#116
@daler
Copy link
Owner

daler commented Jan 24, 2016

This should be working after the big refactor (which included setup.py) in v0.7.0.

@daler daler closed this as completed Jan 24, 2016
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