Conda gives error when I run any command with it.
Traceback (most recent call last):
File "/usr/local/bin/conda", line 7, in <module>
from conda.cli.main import main
File "/usr/local/lib/python2.7/dist-packages/conda/cli/__init__.py", line 8, in <module>
from .main import main # NOQA
File "/usr/local/lib/python2.7/dist-packages/conda/cli/main.py", line 46, in <module>
from ..base.context import context
File "/usr/local/lib/python2.7/dist-packages/conda/base/context.py", line 18, in <module>
from ..common.configuration import (Configuration, MapParameter, PrimitiveParameter,
File "/usr/local/lib/python2.7/dist-packages/conda/common/configuration.py", line 40, in <module>
from ruamel.yaml.comments import CommentedSeq, CommentedMap # pragma: no cover
ImportError: No module named ruamel.yaml.comments
The module
ruamel.yaml.comments
will normally be loaded fromsite-packages/ruamel/yaml/comments.py
, and not fromsite-packages/ruamel_yaml/comments.py
Conda seems to have problems with properly supporting namespaces (
ruamel.
) which I can only attribute to not (yet) being fullypip
compatible. That although "namespaces are a honking good idea", and package namespaces have been around for many years.Assuming you can extend "conda" installations with
pip
you could try to do a normal install ofruamel.yaml
with:I would not normally recommend such an old version, but that is more likely to work in combination with the version conda uses itself internally.
The alternative would be to switch to using python and pip without conda, that way you can just use the latest version of software from PyPI.