【conda命令报错】为什么和tqdm库有关。

经测试只有conda activate env不会报错,
其余的conda list, conda update,conda install等,都一致报错如下:
不理解为什么这些基础命令都在import tqdm这里报错,目前没有搜到类似报错,相关的解决办法比如删掉.condarc,重装tqdm都没用。另外,tqdm我单独使用是可以用的。

>conda update conda
KeyError('pkgs_dirs')
Traceback (most recent call last):
  File "D:\anaconda3\Lib\site-packages\conda\exception_handler.py", line 17, in __call__
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "D:\anaconda3\Lib\site-packages\conda\cli\main.py", line 54, in main_subshell
    parser = generate_parser(add_help=True)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\anaconda3\Lib\site-packages\conda\cli\conda_argparse.py", line 115, in generate_parser
    configure_parser_create(sub_parsers)
  File "D:\anaconda3\Lib\site-packages\conda\cli\conda_argparse.py", line 767, in configure_parser_create
    add_parser_solver(solver_mode_options)
  File "D:\anaconda3\Lib\site-packages\conda\cli\conda_argparse.py", line 1975, in add_parser_solver
    solver.name for solver in context.plugin_manager.get_hook_results("solvers")
                              ^^^^^^^^^^^^^^^^^^^^^^
  File "D:\anaconda3\Lib\site-packages\conda\base\context.py", line 492, in plugin_manager
    from ..plugins.manager import get_plugin_manager
  File "D:\anaconda3\Lib\site-packages\conda\plugins\__init__.py", line 28, in <module>
    from .hookspec import hookimpl  # noqa: F401
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\anaconda3\Lib\site-packages\conda\plugins\hookspec.py", line 16, in <module>
    from .types import (
  File "D:\anaconda3\Lib\site-packages\conda\plugins\types.py", line 15, in <module>
    from ..core.solve import Solver
  File "D:\anaconda3\Lib\site-packages\conda\core\solve.py", line 41, in <module>
    from ..resolve import Resolve
  File "D:\anaconda3\Lib\site-packages\conda\resolve.py", line 15, in <module>
    from tqdm import tqdm
ImportError: cannot import name 'tqdm' from 'tqdm' (unknown location)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\anaconda3\Lib\site-packages\conda\exception_handler.py", line 166, in print_unexpected_error_report
    get_main_info_str(error_report["conda_info"])
  File "D:\anaconda3\Lib\site-packages\conda\cli\main_info.py", line 254, in get_main_info_str
    info_dict[f"_{key}"] = ("\n" + 26 * " ").join(map(str, info_dict[key]))
                                                           ~~~~~~~~~^^^^^
KeyError: 'pkgs_dirs'

# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

    Traceback (most recent call last):
      File "D:\anaconda3\Lib\site-packages\conda\exception_handler.py", line 17, in __call__
        return func(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^
      File "D:\anaconda3\Lib\site-packages\conda\cli\main.py", line 54, in main_subshell
        parser = generate_parser(add_help=True)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "D:\anaconda3\Lib\site-packages\conda\cli\conda_argparse.py", line 115, in generate_parser
        configure_parser_create(sub_parsers)
      File "D:\anaconda3\Lib\site-packages\conda\cli\conda_argparse.py", line 767, in configure_parser_create
        add_parser_solver(solver_mode_options)
      File "D:\anaconda3\Lib\site-packages\conda\cli\conda_argparse.py", line 1975, in add_parser_solver
        solver.name for solver in context.plugin_manager.get_hook_results("solvers")
                                  ^^^^^^^^^^^^^^^^^^^^^^
      File "D:\anaconda3\Lib\site-packages\conda\base\context.py", line 492, in plugin_manager
        from ..plugins.manager import get_plugin_manager
      File "D:\anaconda3\Lib\site-packages\conda\plugins\__init__.py", line 28, in <module>
        from .hookspec import hookimpl  # noqa: F401
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "D:\anaconda3\Lib\site-packages\conda\plugins\hookspec.py", line 16, in <module>
        from .types import (
      File "D:\anaconda3\Lib\site-packages\conda\plugins\types.py", line 15, in <module>
        from ..core.solve import Solver
      File "D:\anaconda3\Lib\site-packages\conda\core\solve.py", line 41, in <module>
        from ..resolve import Resolve
      File "D:\anaconda3\Lib\site-packages\conda\resolve.py", line 15, in <module>
        from tqdm import tqdm
    ImportError: cannot import name 'tqdm' from 'tqdm' (unknown location)

`$ D:\anaconda3\Scripts\conda-script.py update conda`

  environment variables:
conda info could not be constructed.
KeyError('pkgs_dirs')

An unexpected error has occurred. Conda has prepared the above report.
If you suspect this error is being caused by a malfunctioning plugin,
consider using the --no-plugins option to turn off plugins.

Example: conda --no-plugins install <package>

Alternatively, you can set the CONDA_NO_PLUGINS environment variable on
the command line to run the command without plugins enabled.

Example: CONDA_NO_PLUGINS=true conda install <package>

If submitted, this report will be used by core maintainers to improve
future releases of conda.
Would you like conda to send this report to the core maintainers? [y/N]:  n

No report sent. To permanently opt-out, use

    $ conda config --set report_errors false
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值