You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Installs just six, pysam, and pybedtools. (Currently: pybedtools-0.7.7 pysam-0.9.0 six-1.10.0)
Trying to import pybedtools after that results in an error.
$python -c 'import pybedtools'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File ".../python2.7/site-packages/pybedtools/__init__.py", line 12, in <module>
from . import contrib
File ".../python2.7/site-packages/pybedtools/contrib/__init__.py", line 4, in <module>
from . import long_range_interaction
File ".../python2.7/site-packages/pybedtools/contrib/long_range_interaction.py", line 7, in <module>
import numpy as np
ImportError: No module named numpy
Current workaround is to also install numpy and pandas (which is also referenced in contrib, and becomes another ImportError after installing numpy).
numpy and pandas have lengthy builds from source, and are not otherwise necessary to use pybedtools. I would prefer to not have them as dependencies for my project, but I do want to use pybedtools.
Can pybedtools be tweaked to avoid importing contrib files? I think stuff in contrib should only be loaded if imported explicitly. They seem to be there mostly to serve as examples, not as part of the library.
The text was updated successfully, but these errors were encountered:
This was addressed in previous release; functions in the contrib module using pandas/matplotlib now do conditional imports within the function at runtime.
When installing pybedtools 0.7.7 in a clean python virtualenv or newly installed system, eg:
Installs just six, pysam, and pybedtools. (Currently: pybedtools-0.7.7 pysam-0.9.0 six-1.10.0)
Trying to import pybedtools after that results in an error.
Current workaround is to also install numpy and pandas (which is also referenced in contrib, and becomes another ImportError after installing numpy).
numpy and pandas have lengthy builds from source, and are not otherwise necessary to use pybedtools. I would prefer to not have them as dependencies for my project, but I do want to use pybedtools.
Can pybedtools be tweaked to avoid importing contrib files? I think stuff in contrib should only be loaded if imported explicitly. They seem to be there mostly to serve as examples, not as part of the library.
The text was updated successfully, but these errors were encountered: