37

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?

Toly
  • 2,473
  • 7
  • 22
  • 32

5 Answers5

76

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.

Asclepius
  • 49,954
  • 14
  • 144
  • 128
Toly
  • 2,473
  • 7
  • 22
  • 32
7

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.

jvaugha
  • 113
  • 3
  • 7
4

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
Val
  • 20,060
  • 10
  • 64
  • 83
1

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.

Asclepius
  • 49,954
  • 14
  • 144
  • 128
  • I am dealing apparently with similar circumstances, you would add this line just before activate the env, right? – ReinholdN May 13 '20 at 19:41
  • '''FROM continuumio/miniconda:latest WORKDIR /home/reinhold/Documents/webapps/house_market_app/ihm_condaenv COPY environment.yml ./ COPY app.py ./ COPY boot.sh ./ RUN chmod +x boot.sh RUN conda update -n base -c defaults RUN conda env create -f environment.yml RUN echo "source activate ihm_condaenv" > ~/.bashrc ENV PATH /home/reinhold/anaconda3/envs/ihm_condaenv/bin:$PATH EXPOSE 8080 CMD ["./boot.sh"]''' – ReinholdN May 13 '20 at 19:50
  • @ReinholdN Yes. [This](https://stackoverflow.com/a/57595180/) is how I activate the environment prior to defining an `ENTRYPOINT` which runs `python`. – Asclepius May 13 '20 at 23:21
1

I was having trouble installing scrapy with anaconda using ' conda install -c conda-forge scrapy'

I kept getting the

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

error so I tried the mentioned above force install of setup "conda update --force conda" and once that was successful I was able to reapply the scrapy install successfully.