I'm new to Python and need to use a python-based tool called chromosomer that imports some python packages including bioformats. Bioformats has many modules including bed. On running chromosomer, I get the error:
smeeta:~$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import chromosomer
>>> from chromosomer.cli import bioformats
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/chromosomer/cli.py", line 8, in <module>
import bioformats.bed
ImportError: No module named bed
>>> import bioformats
>>> import bioformats.bed
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named bed
>>>
How do I install the package chromosomer and its dependent packages ?
Use
pip
E.g.
Official
pip
documentation link.For Python 2.7.9+ and 3.4+ It should come preinstalled with
pip
Python 2 ≤ 2.7.8 and Python 3 ≤ 3.3 Follow the instructions from here : https://pip.pypa.io/en/stable/installing/#do-i-need-to-install-pip
For more discussion about this question: Does Python have a package/module management system?