Search code examples
pythoncondaminiconda

miniconda3: ImportError: No module named conda.cli


Some updates broke my conda installation...

conda install

now returns

Traceback (most recent call last):
  File "/Users/francoiskroll/miniconda3/bin/conda", line 12, in <module>
    from conda.cli import main
ImportError: No module named conda.cli

Extra details

Not a duplicate of After Anaconda installation, conda command fails with "ImportError: no module named conda.cli"

as I have an entry for conda in my PATH already:

echo $PATH

returns

/Users/francoiskroll/miniconda3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/lib/python3.6/site-packages:/Users/francoiskroll/packages/guppy/bin:/Library/TeX/texbin:/opt/X11/bin

It sounds like it may be a Python problem?

When I fire up python, it looks like:

python

Python 2.7.15 | packaged by conda-forge | (default, Feb 27 2019, 20:44:16) 
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin

But I think I used to do pythonw to fire up python, if ever that helps!

Can you help?


Solution

  • Definitely not an optimal answer, but I solved the issue by re-installing completely miniconda3 (I am on macOSX).

    I uninstalled miniconda3 by removing the folder with

    rm -r ~/miniconda3/

    And resinstalled it: https://docs.conda.io/projects/conda/en/latest/user-guide/install/macos.html#install-macos-silent