Conda install screwed up my environment. Can I undo it?

折月煮酒 提交于 2021-01-03 04:31:21

问题


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.

For example:

1) When I try importing pandas, I get this error: AttributeError: module 'pandas' has no attribute 'core'

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?


回答1:


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

where N is the revision number.



来源:https://stackoverflow.com/questions/54172339/conda-install-screwed-up-my-environment-can-i-undo-it

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!