问题
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