Search code examples
pythonpython-3.xpipanacondaconda

Conda commands not working correctly


I met some problems after installing Anaconda3.   My operation system is Win 10; Anaconda version is Anaconda3-5.2.0-Windows-x86_64; Installation location is : C:\Anaconda   When I type “conda”, “python”, ”pip” or “--version”, they work correctly. But if I type “conda list” or “conda update conda ”, it has some errors as followed:  

Traceback (most recent call last):
      File "C:\Anaconda\lib\site-packages\conda\cli\main.py", line 97, in main
        from ..activate import main as activator_main
      File "C:\Anaconda\lib\site-packages\conda\activate.py", line 12, in <module>
        context.__init__()  # oOn import, context does not include SEARCH_PATH. This line fixes that.
.
.
.
 File "C:\Anaconda\lib\site-packages\ruamel_yaml\reader.py", line 241, in update
        self.check_printable(data)
      File "C:\Anaconda\lib\site-packages\ruamel_yaml\reader.py", line 208, in check_printable
        'unicode', "special characters are not allowed")
    ruamel_yaml.reader.ReaderError: unacceptable character #x0000: special characters are not allowed
      in "C:\Users\martin\.condarc", position 0

  I think the reason might be something about unicode, I tried to find the answer on google and stack overflow, unfortunately, I still cannot solve it.


Solution

  • The problem is resovled, the .condarc file have some unicode error, after I deleted it and create a new one, everything is fine.