Conda 安装搞砸了我的环境。我可以撤消吗?

Aus*_*tin 6 python anaconda conda

我尝试安装 rpy2 以便我可以使用 R 文件 ( .rda)工作conda install -c r rpy2,但它完全搞砸了我的环境。

例如:

1) 当我尝试导入pandas 时,出现此错误:AttributeError: module 'pandas' has no attribute 'core'

2)当我尝试导入matplotlib 时,出现此错误:AttributeError: module 'matplotlib' has no attribute 'artist'

在安装此软件包之前,我没有遇到这些问题。有没有办法撤销我刚刚做的事情——就好像我从来没有安装过一样?

iz_*_*iz_ 16

您可以“回滚”到以前的版本。第一次运行:

conda list --revisions
Run Code Online (Sandbox Code Playgroud)

您将获得带有修订号的修订列表。然后,查看倒数第二个修订版并记下其编号。要恢复到此版本,请运行:

conda install --revision N
Run Code Online (Sandbox Code Playgroud)

哪里N是修订号。

  • 嗨,我刚刚尝试了这个,但收到错误:“CondaRevisionError:无法恢复到 15,因为 conda-forge::openssl-1.0.2p-h470a237_2 不在 repodata 中。”我搜索了 Google,但无法获得认真了解这意味着什么以及如何克服它。 (2认同)