python(8):使用conda update更新conda后,anaconda所有环境崩溃----问题没有解决,不要轻易更新conda

这篇具有很好参考价值的文章主要介绍了python(8):使用conda update更新conda后,anaconda所有环境崩溃----问题没有解决,不要轻易更新conda。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

0. 教训

(1) 不要轻易使用conda update更新conda----我遇到了解决不了的问题
python
(2) 使用python时一定要用工具,如anaconda等,管理自己创建的虚拟环境,不要让自己创建的环境污染系统的base环境,不然就需要重新安装系统了----我这里目前最好的解决方案是删除并重装anaconda

1. 问题:使用conda update更新conda后,anaconda所有环境崩溃

(系统的base没有崩溃)
系统:ubuntu18.04

1.1 问题描述

在创建的虚拟环境中安装包时,提示更新conda

==> WARNING: A newer version of conda exists. <==
  current version: 22.9.0
  latest version: 23.1.0

Please update conda by running

    $ conda update -n base -c defaults conda

我更新后,报错如下:

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
Retrieving notices: ...working... failed
Traceback (most recent call last):
  File "/home/meng/anaconda3/lib/python3.10/site-packages/conda/exceptions.py", line 1129, in __call__
  File "/home/meng/anaconda3/lib/python3.10/site-packages/conda/cli/main.py", line 86, in main_subshell
  File "/home/meng/anaconda3/lib/python3.10/site-packages/conda/cli/conda_argparse.py", line 93, in do_call
  File "/home/meng/anaconda3/lib/python3.10/site-packages/conda/notices/core.py", line 75, in wrapper
  File "/home/meng/anaconda3/lib/python3.10/site-packages/conda/notices/core.py", line 39, in display_notices
  File "/home/meng/anaconda3/lib/python3.10/site-packages/conda/notices/http.py", line 36, in get_notice_responses
  File "/home/meng/anaconda3/lib/python3.10/site-packages/conda/notices/http.py", line 39, in <genexpr>
  File "/home/meng/anaconda3/lib/python3.10/concurrent/futures/_base.py", line 621, in result_iterator
  File "/home/meng/anaconda3/lib/python3.10/concurrent/futures/_base.py", line 319, in _result_or_cancel
  File "/home/meng/anaconda3/lib/python3.10/concurrent/futures/_base.py", line 458, in result
  File "/home/meng/anaconda3/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
  File "/home/meng/anaconda3/lib/python3.10/concurrent/futures/thread.py", line 58, in run
  File "/home/meng/anaconda3/lib/python3.10/site-packages/conda/notices/http.py", line 42, in <lambda>
  File "/home/meng/anaconda3/lib/python3.10/site-packages/conda/notices/cache.py", line 37, in wrapper
  File "/home/meng/anaconda3/lib/python3.10/site-packages/conda/notices/http.py", line 58, in get_channel_notice_response
  File "/home/meng/anaconda3/lib/python3.10/site-packages/requests/sessions.py", line 600, in get
    return self.request("GET", url, **kwargs)
  File "/home/meng/anaconda3/lib/python3.10/site-packages/requests/sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/meng/anaconda3/lib/python3.10/site-packages/requests/sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
  File "/home/meng/anaconda3/lib/python3.10/site-packages/requests/adapters.py", line 460, in send
    self.cert_verify(conn, request.url, verify, cert)
  File "/home/meng/anaconda3/lib/python3.10/site-packages/requests/adapters.py", line 263, in cert_verify
    raise OSError(
OSError: Could not find a suitable TLS CA certificate bundle, invalid path: /home/meng/anaconda3/lib/python3.10/site-packages/certifi/cacert.pem

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/meng/anaconda3/bin/conda", line 15, in <module>
  File "/home/meng/anaconda3/lib/python3.10/site-packages/conda/cli/main.py", line 129, in main
  File "/home/meng/anaconda3/lib/python3.10/site-packages/conda/exceptions.py", line 1429, in conda_exception_handler
  File "/home/meng/anaconda3/lib/python3.10/site-packages/conda/exceptions.py", line 1132, in __call__
  File "/home/meng/anaconda3/lib/python3.10/site-packages/conda/exceptions.py", line 1172, in handle_exception
  File "/home/meng/anaconda3/lib/python3.10/site-packages/conda/exceptions.py", line 1183, in handle_unexpected_exception
  File "/home/meng/anaconda3/lib/python3.10/site-packages/conda/exceptions.py", line 1245, in print_unexpected_error_report
ModuleNotFoundError: No module named 'conda.cli.main_info'

重点报错有两条,依次为:
Could not find a suitable TLS CA certificate bundle, invalid path: /home/meng/anaconda3/lib/python3.10/site-packages/certifi/cacert.pem
ModuleNotFoundError: No module named 'conda.cli.main_info'

然后无论是在anaconda的虚拟环境还是anacondabase环境,运行conda xx等命令都会报错ModuleNotFoundError: No module named 'tqdm'

meng@meng:~/Downloads/cmake-3.18.0$ conda env list
Traceback (most recent call last):
  File "/home/meng/anaconda3/bin/conda", line 13, in <module>
    sys.exit(main())
  File "/home/meng/anaconda3/lib/python3.7/site-packages/conda/cli/main.py", line 101, in main
    from ..exceptions import conda_exception_handler
  File "/home/meng/anaconda3/lib/python3.7/site-packages/conda/exceptions.py", line 30, in <module>
    from .common.io import dashlist, timeout
  File "/home/meng/anaconda3/lib/python3.7/site-packages/conda/common/io.py", line 23, in <module>
    from tqdm import tqdm
ModuleNotFoundError: No module named 'tqdm'

使用pip安装tqdm也不行,这里应该是pip在conda更新的过程中被卸载了

meng@meng:~/Downloads/cmake-3.18.0$ pip install tqdm
Traceback (most recent call last):
  File "/home/meng/anaconda3/bin/pip", line 7, in <module>
    from pip._internal.cli.main import main
ModuleNotFoundError: No module named 'pip'

1.2 我搜索到的全网最相关的问题----也没有解决

conda update causes ImportError: No module named tqdm

3 尝试流程记录

(退出anaconda的虚拟环境,应该是不允许的),另开一个终端,进入anacondabase环境

3.1 重新安装pip

参考:anaconda虚拟环境中误删pip问题(No module named pip)

python -m ensurepip #(这好像是重新安装pip)
python -m pip install --upgrade pip #(这好像是更新pip)

会有比较多红色的报错,但好像安装上了

==> warning: a newer version of conda exists. <== current version: 22.9.0 la,ubuntu使用,python,conda,开发语言,anaconda,linux

再运行conda相关命令,还是报错,主要报错为ImportError: libffi.so.8: cannot open shared object file: No such file or directory

==> warning: a newer version of conda exists. <== current version: 22.9.0 la,ubuntu使用,python,conda,开发语言,anaconda,linux

3.2 解决anaconda编译问题----没成功

参考:ImportError: libffi.so.7: cannot open shared object file: No such file or directory解决方法

cd anaconda3/lib
ls | grep "libffi"
ln -s libffi.so.7 libffi.so.8

还是不行,报错如下,主要报错为ImportError: /home/meng/anaconda3/lib/python3.7/lib-dynload/../../libffi.so.8: version LIBFFI_CLOSURE_8.0’ not found (required by /home/meng/anaconda3/lib/python3.7/lib-dynload/_ctypes.cpython-37m-x86_64-linux-gnu.so)`文章来源地址https://www.toymoban.com/news/detail-778447.html

meng@meng:~/Downloads/cmake-3.18.0$ conda env list
KeyError('pkgs_dirs')
Traceback (most recent call last):
  File "/home/meng/anaconda3/lib/python3.7/site-packages/conda/exceptions.py", line 1124, in __call__
    return func(*args, **kwargs)
  File "/home/meng/anaconda3/lib/python3.7/site-packages/conda/cli/main.py", line 57, in main_subshell
    p = generate_parser()
  File "/home/meng/anaconda3/lib/python3.7/site-packages/conda/cli/conda_argparse.py", line 41, in generate_parser
    description='conda is a tool for managing and deploying applications,'
  File "/home/meng/anaconda3/lib/python3.7/site-packages/conda/cli/conda_argparse.py", line 117, in __init__
    self._subcommands = context.plugin_manager.get_hook_results("subcommands")
  File "/home/meng/anaconda3/lib/python3.7/site-packages/conda/base/context.py", line 422, in plugin_manager
    from ..plugins.manager import get_plugin_manager
  File "/home/meng/anaconda3/lib/python3.7/site-packages/conda/plugins/manager.py", line 9, in <module>
    from . import solvers, virtual_packages
  File "/home/meng/anaconda3/lib/python3.7/site-packages/conda/plugins/virtual_packages/__init__.py", line 5, in <module>
    from . import archspec, cuda, linux, osx, windows
  File "/home/meng/anaconda3/lib/python3.7/site-packages/conda/plugins/virtual_packages/cuda.py", line 3, in <module>
    import ctypes
  File "/home/meng/anaconda3/lib/python3.7/ctypes/__init__.py", line 7, in <module>
    from _ctypes import Union, Structure, Array
ImportError: /home/meng/anaconda3/lib/python3.7/lib-dynload/../../libffi.so.8: version `LIBFFI_CLOSURE_8.0' not found (required by /home/meng/anaconda3/lib/python3.7/lib-dynload/_ctypes.cpython-37m-x86_64-linux-gnu.so)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/meng/anaconda3/lib/python3.7/site-packages/conda/exceptions.py", line 1244, in print_unexpected_error_report
    message_builder.append(get_main_info_str(error_report['conda_info']))
  File "/home/meng/anaconda3/lib/python3.7/site-packages/conda/cli/main_info.py", line 236, in get_main_info_str
    info_dict['_' + key] = ('\n' + 26 * ' ').join(info_dict[key])
KeyError: 'pkgs_dirs'

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

    Traceback (most recent call last):
      File "/home/meng/anaconda3/lib/python3.7/site-packages/conda/exceptions.py", line 1124, in __call__
        return func(*args, **kwargs)
      File "/home/meng/anaconda3/lib/python3.7/site-packages/conda/cli/main.py", line 57, in main_subshell
        p = generate_parser()
      File "/home/meng/anaconda3/lib/python3.7/site-packages/conda/cli/conda_argparse.py", line 41, in generate_parser
        description='conda is a tool for managing and deploying applications,'
      File "/home/meng/anaconda3/lib/python3.7/site-packages/conda/cli/conda_argparse.py", line 117, in __init__
        self._subcommands = context.plugin_manager.get_hook_results("subcommands")
      File "/home/meng/anaconda3/lib/python3.7/site-packages/conda/base/context.py", line 422, in plugin_manager
        from ..plugins.manager import get_plugin_manager
      File "/home/meng/anaconda3/lib/python3.7/site-packages/conda/plugins/manager.py", line 9, in <module>
        from . import solvers, virtual_packages
      File "/home/meng/anaconda3/lib/python3.7/site-packages/conda/plugins/virtual_packages/__init__.py", line 5, in <module>
        from . import archspec, cuda, linux, osx, windows
      File "/home/meng/anaconda3/lib/python3.7/site-packages/conda/plugins/virtual_packages/cuda.py", line 3, in <module>
        import ctypes
      File "/home/meng/anaconda3/lib/python3.7/ctypes/__init__.py", line 7, in <module>
        from _ctypes import Union, Structure, Array
    ImportError: /home/meng/anaconda3/lib/python3.7/lib-dynload/../../libffi.so.8: version `LIBFFI_CLOSURE_8.0' not found (required by /home/meng/anaconda3/lib/python3.7/lib-dynload/_ctypes.cpython-37m-x86_64-linux-gnu.so)

`$ /home/meng/anaconda3/bin/conda env list`

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

An unexpected error has occurred. Conda has prepared the above report.

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

到了这里,关于python(8):使用conda update更新conda后,anaconda所有环境崩溃----问题没有解决,不要轻易更新conda的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 在Anaconda(conda)(命令行/Linux )中新建环境安装python版本,删除环境等

    1.在命令行终端新建conda环境 例如新建一个叫love的环境 在Windows的Anaconda Prompt 或 macOS/Linux的终端输入 2.激活环境 注:运行conda activate则直接激活anaconda的base环境 3.退出环境 4.查看现有的环境有哪些 5.删除环境

    2024年01月16日
    浏览(57)
  • 使用mamba替换conda和anaconda配置环境安装软件

    使用mamba替换miniconda和anaconda,原因是速度更快,无论是创建新环境还是激活环境 conda、mamba、anaconda都是蟒蛇的意思… linux和mac使用命令行下载mambaforge windows版本和linux、mac版本可以从夸克网盘下载 链接:https://pan.quark.cn/s/6fd066275bd1 提取码:iG2E windows直接鼠标双击打开Mambafo

    2024年01月19日
    浏览(93)
  • 【技术分享】Anaconda下载安装、pip切换镜像源、conda切换镜像、conda创建指定Python版本虚拟环境教程

    步骤: 进入Anaconda官网,点击 Download 按钮下载最新的Anaconda版本包。 注意: 在 Download 下方有一段小字,写着 Python 3.9 • 64-Bit Graphical Installer • 688 MB ,说明现在最新的版本是Python3.9,图形化的安装包有688MB,是64位的架构。 【有人疑问说】: 我想下载Python3.8对应的Anaconda,

    2024年02月07日
    浏览(94)
  • 前端报警告:Maximum recursive updates exceeded...打报到生产环境页面崩溃

    开发笔记 vue3 vue3 本地报警告:Maximum recursive updates exceeded. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function. –》百度翻译: 超过了最大递归更新数。这意味着

    2024年02月12日
    浏览(66)
  • PyCharm添加Anaconda中的虚拟环境,Python解释器出现Conda executable is not found(解决方案)

    项目场景: 在使用Anconda配置好虚拟环境后,需要添加到PyCharm中遇到的问题。 作者是在创建新项目的时候,选择conda环境出现Conda executable is not found的错误, 本机Window10系统安装PySpark环境。 作者猜测原因:本机中没有配置全局Anconda环境,识别不出conda.exe文件(本机Anconda安装

    2024年02月05日
    浏览(62)
  • 使用conda更新python版本

    目录 一、更新原因 二、步骤         2.1、添加conda下载镜像         2.2、conda更新python         2.3、更新conda版本 三、验证 四、离线安装         原因是本来使用的是具有python3.6.3版本的conda环境,但是因为python内存堆栈溢出的bug问题。现在需要将Python的版本更新到

    2023年04月08日
    浏览(34)
  • 【conda】conda 版本控制和环境迁移/安装conda加速工具mamba /conda常用指令/Anaconda配置

    0. conda 版本控制和环境迁移 基本用法查看当前环境中的所有软件 进阶,导出环境中安装包的列表 方法1: 安装导出的信息: 方法2:用conda env的export功能 导出想要导出的环境 根据导出的yml文件创建环境 根据导出的yml文件更新环境 yml文件提供的信息更全面 1. 安装conda加速工

    2024年01月23日
    浏览(62)
  • 【最新版配置conda环境】新版pycharm导入新版anaconda环境

    最近下载了新版pycharm和新版anaconda,并且在命令行创建了环境,想着在pycharm里面导入环境。结果现在的导入方式发生了变化。 之前是通过导入Python.exe进行的。 现在: 当我们点击进去之后,会发现找不到python.exe了。 具体什么原因我不知道,应该是版本问题。 解决方法: 通

    2024年02月08日
    浏览(55)
  • Anaconda创建、删除虚拟环境以及一些conda常用指令

    1. 创建虚拟环境 一般在创建环境的时候用第一条指令即可,有需要的包等后面再安装。注意,在安装环境时要指定Python的版本,否则会自动安装Python的最新版本 2. 激活虚拟环境 3. 删除虚拟环境 4. 复制虚拟环境 (1).在本机上面进行环境复制 (2).复制到其他的机器上面 方案二的

    2023年04月21日
    浏览(44)
  • vscode+anaconda安装及conda虚拟环境的激活

    进入vscode官网下载安装:Visual Studio Code - Code Editing. Redefined    下载安装包直接点击安装即可。  如果有需要可以安装中文包 这里使用的是本地解释器,还没下载使用conda环境(这一步可以先跳过,先下载安装完anaconda再在虚拟环境下运行) 使用快捷键ctrl+F5直接运行测试 测试

    2024年02月04日
    浏览(50)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包