RemoveError: 'setuptools' is a dependency of conda and cannot be removed from conda's operating environment

て烟熏妆下的殇ゞ 提交于 2020-06-24 07:41:05

问题


I have Win 10

When running:

conda update conda

I encountered this error:

RemoveError: 'setuptools' is a dependency of conda and cannot be removed from
conda's operating environment.

Nothing seems to help

I tried to uninstall anaconda and got a successful message but it seems there are some traces of older version that still persist

How can I completely erase all traces of Anaconda installation?


回答1:


While I still did not find how to cleanly uninstall anaconda, I was able to resolve the error by using the following:

conda update --force conda
conda update anaconda

and again

conda update conda

As a result, I got a stable environment with no dependency conflicts. Seems like something within latest conda is too restrictive and update must be forced.




回答2:


I am on a Mac rather than Windows but I was getting the same message. I was able to update by running conda update setuptools. It brought conda up-to-date in the process.




回答3:


I'm on Linux Ubuntu 16.04, and it works for me by:

conda uninstall setuptools
# This is a must to make it work
conda install setuptools
conda update --force conda



回答4:


I ran into this issue in a Dockerfile using continuumio/miniconda3:latest in which I had the line:

RUN conda update -n base -c defaults conda

To fix it, I simply appended the setuptools requirement:

RUN conda update -n base -c defaults conda setuptools

There was no need for any other heroics.



来源:https://stackoverflow.com/questions/57549872/removeerror-setuptools-is-a-dependency-of-conda-and-cannot-be-removed-from-co

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