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

前端 未结 11 677
情歌与酒
情歌与酒 2021-02-05 02:47

Having trouble installing a third party library and I have not seen this error before using Windows 10 with Anaconda installed:

C:\\Users\\XYZ>conda env creat         


        
相关标签:
11条回答
  • 2021-02-05 03:01

    I had solved the problem RemoveError: 'setuptools' is a dependency of conda and cannot be removed from conda's operating environment.

    enter image description here

    As the following way:

    • pip uninstall setuptools
    • conda update conda
    • conda update setuptools

    enter image description here

    and then check tools

    enter image description here

    I haven't met any mistakes yet, but help me correct my way , if something wrong, please

    0 讨论(0)
  • 2021-02-05 03:03

    I had the same problem, which was due to a bad installation of a package (OpenEXR in my case). Try to verify your package with conda list yourPackage. If you find which one it is, prefer installing it with pre-built packages here : https://www.lfd.uci.edu/~gohlke/pythonlibs/.

    A stack-overflow thread that helped me : Python 2.7, PIP: "Failed building wheel for ..."

    EDIT : Two friends had the same error, one solved it by installing/executing with admin rights. The other one succeeded by creating a new virtual environnement for python.

    0 讨论(0)
  • 2021-02-05 03:06

    running conda update conda before solved the problem for me

    0 讨论(0)
  • 2021-02-05 03:06

    try conda env create --force -f python3.6-environment-windows.yml I'm not sure exactly where to place it but I use the --force whenever I run into issues like this like conda update --force conda or conda install --force ... use it as last solution since it force conda to perform the command and you might run into some issues later on

    0 讨论(0)
  • 2021-02-05 03:09

    Silly point to make here but I've been caught by this before: you may not be in the environment you think you are. Just before killing off any package run a quick check to see:

    conda env list
    

    Performing ops on the base environment can cause issues, so you may want to create or change environment.

    0 讨论(0)
  • 2021-02-05 03:11

    This worked for me on Linux:

    1. Uninstall the package via pip:

      pip uninstall setuptools
      
    2. Reinstall using the following command:

      conda install -c anaconda setuptools
      

    Consider also that system packages (python3-setuptools, python-setuptools in Ubuntu) might need to be removed.

    0 讨论(0)
提交回复
热议问题