大致报错如下:
Traceback (most recent call last): File "E:\ProgramData\anaconda3\Lib\site-packages\conda\exception_handler.py", line 17, in __call__ return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "E:\ProgramData\anaconda3\Lib\site-packages\conda\cli\main.py", line 64, in main_subshell exit_code = do_call(args, parser) ^^^^^^^^^^^^^^^^^^^^^ File "E:\ProgramData\anaconda3\Lib\site-packages\conda\cli\conda_argparse.py", line 167, in do_call result = getattr(module, func_name)(args, parser) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ProgramData\anaconda3\Lib\site-packages\conda\notices\core.py", line 124, in wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "E:\ProgramData\anaconda3\Lib\site-packages\conda\cli\main_create.py", line 50, in execute install(args, parser, "create") File "E:\ProgramData\anaconda3\Lib\site-packages\conda\cli\install.py", line 316, in install unlink_link_transaction = solver.solve_for_transaction( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ProgramData\anaconda3\Lib\site-packages\conda\core\solve.py", line 174, in solve_for_transaction self._notify_conda_outdated(link_precs) File "E:\ProgramData\anaconda3\Lib\site-packages\conda\core\solve.py", line 1224, in _notify_conda_outdated SubdirData.query_all( File "E:\ProgramData\anaconda3\Lib\site-packages\conda\core\subdir_data.py", line 158, in query_all result = tuple( ^^^^^^ File "E:\ProgramData\anaconda3\Lib\concurrent\futures\_base.py", line 619, in result_iterator yield _result_or_cancel(fs.pop()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ProgramData\anaconda3\Lib\concurrent\futures\_base.py", line 317, in _result_or_cancel return fut.result(timeout) ^^^^^^^^^^^^^^^^^^^ File "E:\ProgramData\anaconda3\Lib\concurrent\futures\_base.py", line 449, in result return self.__get_result() ^^^^^^^^^^^^^^^^^^^ File "E:\ProgramData\anaconda3\Lib\concurrent\futures\_base.py", line 401, in __get_result raise self._exception File "E:\ProgramData\anaconda3\Lib\concurrent\futures\thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ProgramData\anaconda3\Lib\site-packages\conda\core\subdir_data.py", line 143, in subdir_query return tuple( ^^^^^^ File "E:\ProgramData\anaconda3\Lib\site-packages\conda\core\subdir_data.py", line 165, in query self.load() File "E:\ProgramData\anaconda3\Lib\site-packages\conda\core\subdir_data.py", line 265, in load _internal_state = self._load() ^^^^^^^^^^^^ File "E:\ProgramData\anaconda3\Lib\site-packages\conda\core\subdir_data.py", line 322, in _load repodata, state = fetcher.fetch_latest_parsed() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ProgramData\anaconda3\Lib\site-packages\conda\gateways\repodata\__init__.py", line 758, in fetch_latest_parsed parsed, state = self.fetch_latest() ^^^^^^^^^^^^^^^^^^^ File "E:\ProgramData\anaconda3\Lib\site-packages\conda\gateways\repodata\__init__.py", line 820, in fetch_latest cache.load_state() File "E:\ProgramData\anaconda3\Lib\site-packages\conda\gateways\repodata\__init__.py", line 626, in load_state self.load(state_only=True) File "E:\ProgramData\anaconda3\Lib\site-packages\conda\gateways\repodata\__init__.py", line 576, in load state = json.loads(state_file.read()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ProgramData\anaconda3\Lib\json\__init__.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ProgramData\anaconda3\Lib\json\decoder.py", line 340, in decode raise JSONDecodeError("Extra data", s, end) json.decoder.JSONDecodeError: Extra data: line 9 column 2 (char 280)
需要根据报错信息来解决,下面提供两种解决方式:
第一种:
1.清除 conda
配置:
conda config --remove-key channels
2.重新配置 conda
conda config --add channels defaults
conda config --add channels conda-forge
conda config --add channels bioconda
第二种:
在windos 找user下的.conda文件,清空envs和pkgs
标签:Lib,ProgramData,create,py,project,conda,anaconda3,报错,line From: https://www.cnblogs.com/Gaze/p/18224735