Conda安装搞砸了我的环境.我可以撤消吗? [英] Conda install screwed up my environment. Can I undo it?
问题描述
我尝试安装rpy2,以便可以使用 conda install -c r rpy2
处理R文件( .rda
),这完全破坏了我的环境.
I tried installing rpy2 so that I could work with R files (.rda
) using conda install -c r rpy2
, and it totally screwed up my environment.
例如:
1)尝试导入 pandas 时,出现以下错误: AttributeError:模块'pandas'没有属性'core'
1) When I try importing pandas, I get this error: AttributeError: module 'pandas' has no attribute 'core'
2)当我尝试导入 matplotlib 时,出现以下错误: AttributeError:模块'matplotlib'没有属性'artist'
2) When I try importing matplotlib, I get this error: AttributeError: module 'matplotlib' has no attribute 'artist'
在安装此软件包之前,我没有遇到这些问题.有没有办法撤消我刚刚做的事情-好像我从来没有首先安装它一样?
I wasn't having these issues before I installed this package. Is there a way to undo what I just did - as if I never installed it in the first place?
推荐答案
您可以回滚"到以前的版本.首先,运行:
You can "roll back" to a previous revision. First, run:
conda list --revisions
您将获得一个修订列表及其修订编号.然后,查看倒数第二个修订并记下其编号.要恢复到该修订版,请运行:
You will get a list of revisions with their revision number. Then, look at the second-to-last revision and take note of its number. To revert to this revision, run:
conda install --revision N
其中 N
是修订号.
这篇关于Conda安装搞砸了我的环境.我可以撤消吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!