pyteomics 3.4 incompatible with current versions of pepxmltk and cythonize

Issue #25 new
mglubber
created an issue

Installing pyteomics with conda (from the bioconda channel) installs version 3.4, which appears to incompatible with the current versions of pyteomics.pepxmltk and pyteomics.cythonize available through pip. E.g.

conda create --name some_env python=2.7 -c bioconda pyteomics
conda activate some_env
pip install pyteomics.pepxmltk

Will give an ImportError if I try to use pyteomics, e.g.

>>> from pyteomics import mass
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name mass

The same error occurs if pyteomics.cythonize is installed instead of pepxmltk.

However, if I install both pyteomics and the additional modules through pip, pyteomics version 3.4.2 is installed and everything works correctly.

conda create --name some_env python=2.7
conda activate some_env
pip install pyteomics pyteomics.pepxmltk
>>> from pyteomics import mass
>>> mass.calculate_mass(formula="H2O")
18.0105646837

Installing just pyteomics through conda without any additional modules also works correctly.

Comments (2)

  1. Lev Levitsky repo owner

    Thanks for reporting. I'm not used to conda and couldn't make your first command work right off the bat, but I see that if I conda install pyteomics and then pip install pyteomics.pepxmltk, it breaks pyteomics imports.

    This happens because pyteomics is installed as an egg: some_env/lib/python2.7/site-packages/pyteomics-3.4-py2.7.egg, and pyteomics.pepxmltk installs into some_env/lib/python2.7/site-packages/pyteomics. Apparently the import mechanism then ignores the egg when looking for modules.

  2. mglubber reporter

    Thanks for looking into it. I've reported the issues on the bioconda-recipes github (including what you found about the egg vs pyteomics folder), since the issue only appear to be with installation through conda.

  3. Log in to comment