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.