我尝试使用以下命令将 conda 更新到最新版本:
(base) PS C:\> conda update -n base -c defaults conda
Preparing transaction: done
Verifying transaction: done
Executing transaction: - DEBUG menuinst_win32:__init__(199): Menu: name: 'Anaconda${PY_VER} ${PLATFORM}', prefix: 'C:\Users\username\AppData\Local\Continuum\anaconda3', env_name: 'None', mode: 'user', used_mode: 'user'
DEBUG menuinst_win32:create(323): Shortcut cmd is C:\Users\username\AppData\Local\Continuum\anaconda3\python.exe, args are ['C:\\Users\\username\\AppData\\Local\\Continuum\\anaconda3\\cwp.py', 'C:\\Users\\username\\AppData\\Local\\Continuum\\anaconda3', 'C:\\Users\\username\\AppData\\Local\\Continuum\\anaconda3\\python.exe', 'C:\\Users\\username\\AppData\\Local\\Continuum\\anaconda3\\Scripts\\jupyter-notebook-script.py', '"%USERPROFILE%/"']
done
Rolling back transaction: done
AssertionError()
()
AssertionError()
AssertionError()
在此之后,基本的 anaconda python 似乎被破坏了,与通常的 conda 命令有关的任何事情似乎都返回相同的 No module named 'conda_package_handling' 错误。我该如何解决这个问题,请指教。
例如:
(base) PS C:\> conda list
Error processing line 1 of C:\Users\username\AppData\Local\Continuum\anaconda3\lib\site-packages\matplotlib-3.1.0-py3.7-nspkg.pth:
Traceback (most recent call last):
File "C:\Users\username\AppData\Local\Continuum\anaconda3\lib\site.py", line 168, in addpackage
exec(line)
File "<string>", line 1, in <module>
File "<frozen importlib._bootstrap>", line 580, in module_from_spec
AttributeError: 'NoneType' object has no attribute 'loader'
Remainder of file ignored
Traceback (most recent call last):
File "C:\Users\username\AppData\Local\Continuum\anaconda3\lib\site-packages\conda\exceptions.py", line 1062, in __call__
return func(*args, **kwargs)
File "C:\Users\username\AppData\Local\Continuum\anaconda3\lib\site-packages\conda\cli\main.py", line 84, in _main
exit_code = do_call(args, p)
File "C:\Users\username\AppData\Local\Continuum\anaconda3\lib\site-packages\conda\cli\conda_argparse.py", line 80, in do_call
萧十郎
相关分类