Using pybedtools under Python 2.6

I encountered an import error from collections import OrderedDict, while using pybedtools under Python 2.6. It took me some time to find a workaround… I posted it below.
[bash]
# install dependencies and pybedtools
pip install cython ordereddict
pip install pybedtools

# edit file … lib/python2.6/site-packages/pybedtools/contrib/venn_maker.py
# comment import from collections and add try-except
#from collections import OrderedDict
try:
from collections import OrderedDict
except ImportError:
from ordereddict import OrderedDict
[/bash]

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s