gpt4 book ai didi

python - conda 更新导致 ImportError : No module named tqdm

转载 作者:太空宇宙 更新时间:2023-11-04 04:08:40 24 4
gpt4 key购买 nike

每当我尝试使用 conda 更新任何内容时,我都会收到错误消息:ImportError: No module named tqdm。这是完整的回溯:

$ conda update conda
Traceback (most recent call last):
File "/Users/user/anaconda2/bin/conda", line 13, in <module>
sys.exit(main())
File "/Users/user/anaconda2/lib/python2.7/site-packages/conda/cli/main.py", line 150, in main
return conda_exception_handler(_main, *args, **kwargs)
File "/Users/user/anaconda2/lib/python2.7/site-packages/conda/exceptions.py", line 1335, in conda_exception_handler
return_value = exception_handler(func, *args, **kwargs)
File "/Users/user/anaconda2/lib/python2.7/site-packages/conda/exceptions.py", line 1046, in __call__
return self.handle_exception(exc_val, exc_tb)
File "/Users/user/anaconda2/lib/python2.7/site-packages/conda/exceptions.py", line 1090, in handle_exception
return self.handle_unexpected_exception(exc_val, exc_tb)
File "/Users/user/anaconda2/lib/python2.7/site-packages/conda/exceptions.py", line 1101, in handle_unexpected_exception
self.print_unexpected_error_report(error_report)
File "/Users/user/anaconda2/lib/python2.7/site-packages/conda/exceptions.py", line 1171, in print_unexpected_error_report
from .cli.main_info import get_env_vars_str, get_main_info_str
File "/Users/user/anaconda2/lib/python2.7/site-packages/conda/cli/main_info.py", line 19, in <module>
from ..core.index import _supplement_index_with_system
File "/Users/user/anaconda2/lib/python2.7/site-packages/conda/core/index.py", line 9, in <module>
from .package_cache_data import PackageCacheData
File "/Users/user/anaconda2/lib/python2.7/site-packages/conda/core/package_cache_data.py", line 15, in <module>
from conda_package_handling.api import InvalidArchiveError
File "/Users/user/anaconda2/lib/python2.7/site-packages/conda_package_handling/api.py", line 5, in <module>
import tqdm
ImportError: No module named tqdm

但是,当我尝试使用 pip 安装 tqdm 时,它说它已经安装了:

$ pip install tqdm
Requirement already satisfied: tqdm in /usr/local/lib/python2.7/site-packages (4.32.2)

我在没有虚拟环境的 MacOS Mojave 上使用 Python 2.7。我该如何修复 conda?

编辑:我也试过:python -m pip install tqdm 但它说要求已经满足。

然后我尝试了:/Users/user/anaconda2/bin/python -m pip install tqdm 但它也说要求已经满足:要求已经满足:tqdm in ./anaconda2/lib/python2.7/site-packages (4.31.1)

最佳答案

我最终删除并重新安装了 anaconda,这解决了问题。

关于python - conda 更新导致 ImportError : No module named tqdm,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56784763/

24 4 0