New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RemoveError: 'requests' is a dependency of conda and cannot be removed from conda's operating environment #8149
Comments
Is there any update on this? |
I have the exact same problem when I try to upgrade PyTorch |
I have the same on MacOS Mojave, how can I fix this thing?? |
Doing 'conda update conda' before it worked for me |
Not sure why conda deleted my comment, but re-opening this since many others have the same issue. I will let someone from the Conda team to close it when there is an appropriate solution. |
Same problem on Linux too, creating a new environment is failing with latest version of conda |
I had it with setuptools instead, and updating conda fixed it. |
I had the requests dependency error on MacOS with conda v4.6.2, python 3.7.2. I had miniconda installed, not sure if trying to update it with anaconda commands might have caused the error. Anyways, doing |
I had the same issue (and additionally also the same problem for I updated the package with |
I also tried removing the pip package ( reinstalling: python.app-2-py37_9 ...
cp: /Users/pbos/sw/miniconda3/pythonapp: No such file or directory
ln: ./lib: File exists
Error: post-link failed for: python.app-2-py37_9 After this I gave up and simply reinstalled miniconda. |
@satrya-sabeni's fix worked for me (updating conda with |
|
|
Having the same issue while upgrading to PyTorch. I'll try @rocknamx8 solution and see if it works. |
I had the same problem today, and |
I hade the same problem, but conda update conda doesn't work |
Same problem. "conda update conda" does not work on my machine either. See outcome:
|
@matthiastns Doing 'conda update --force conda' worked for me |
@alekhka You are my hero. That solved it for me. Thank you very much. |
@alekhka is my hero too. this is the only solution that worked for me as well. |
Doing 'conda update --force conda' worked for me |
conda update in any form did not work for me and kept throwing similar error "conda create failure--RemoveError: 'setuptools' is a dependency of conda and cannot be removed from conda's operating environment. Updating Anaconda Navigator fixed my issue. |
I find those |
I wouldn't try to upgrade the Python version in an existing virtual env, especially not |
OK like mentioned here, What brought this up was trying to get ROS (robotics OS) to run on Fedora and having the So once I active Python 3.8, I'm hoping this should be fixed? |
Yikes. Probably not! I don't know much about any of that stuff but I doubt which conda virtualenv you're in affects it. You could try to |
Tried |
This worked for me. |
Tried conda deactivate and conda update --force conda and did not work... furthermore was unable to try any other proposed fixes and am now having to reinstall anaconda. And also note, every try took a couple of hours |
I had this when trying to
I 'solved' it by using I've been using miniconda. |
I was trying to update my (8 mo. old) miniconda3 installation, and ended up tried just about everything, except hacking/editing code (already a bad idea), and nothing worked, except for the following.
# Remove index cache, lock files, unused cache packages, and tarballs.
conda clean -a -vv
conda deactivate
#--------------------------------------------------------
# Fixing the conda update problem
#--------------------------------------------------------
# -c CHANNEL
# Additional channel to search for packages. These are
# URLs searched in the order they are given (including
# file:// for local directories). Then, the defaults or
# channels from .condarc are searched (unless
# --override-channels is given). You can use 'defaults'
# to get the default packages for conda. You can also
# use any name and the .condarc channel_alias value will
# be prepended. The default channel_alias is
# http://conda.anaconda.org/.
#
# -n ENVIRONMENT
#--------------------------------------------------------
conda update -y -n base -c defaults conda --force
conda activate
conda update -y --force conda
pip list -o
# This will still show these as outdated but OK..
#------------------------------------------------
# Package Version Latest Type
# ----------- ------------------- ------- -----
# ruamel-yaml 0.15.87 0.16.12 wheel
# setuptools 49.6.0.post20200814 50.3.0 wheel
#------------------------------------------------
pip install -U setuptools
conda deactivate
# Remove any files related to "ruamel-yaml":
# WARNING: Recursive removal, so don't fuck this up!
cd $env:_CONDA_ROOT
gci -r -fi "ruamel*" | ForEach-Object { rm -Recurse -Force $_ }
#---------------------------------------------------------------------
# IMPORTANT!
# Now when conda doesn't work, it does something to the environment
# variables, or perhaps simply kicks you out of the (base).
# In my case it ended up switching the python/pip interpreter, because
# I have 2 installed. Make sure you're on your original one.
# In my case it was 3.7, so I had to check it is using the right pip
# version and it's on the right path.
#---------------------------------------------------------------------
pip3.7 -V
# Correct output should be:
# pip 20.2.3 from c:\users\<username>\miniconda3\lib\site-packages\pip (python 3.7)
pip3.7.exe install ruamel-yaml
conda activate
# ok ALL GOOD! |
|
Thank You, I was struggling for days. . . . . . jus your line made it easy, now everything got updated and working fine . . . : ) |
Perhaps you can tell us why this is better or how it's different from just removing conda and re-installing it? |
I was afraid of losing all the environments which I have been worked for the last year, So I really tried my best not to uninstall the anaconda and I wanted to retain all the Env. I tried various options to remove the dependency error.. . Nothing actually worked. At last conda update --force-reinstall conda did work and I was able to retain all my previous conda Env s. now everything working absolutely fine . . . . . |
works well for me, too. Thanks. |
To update from 4.8.5 I had to do both:
|
'conda update --force conda' worked for me |
This worked for me as well. |
'conda update conda -f' work for me |
How can updating conda cause it to try and remove it's own dependency? I'm now trying to solve this error on SageMaker with the
And after completion |
This worked for and after that, I reinstalled the library that was throwing the error- xgboost using |
Thank you, this actually solves the incompatible problems of conda packages. |
I was not able to resolve this in Linux either by reinstalling setuptools or updating conda with force flag, I just kept getting My solution, may not be popular to some was to install micromamba, set the |
'conda update --force conda' did not work for me until closed anaconda client ,then it worked |
I managed to solve this: Then I downloaded the .sh file from anaconda website (https://www.anaconda.com/) and installed it with Previously I was just doing the second step |
Hi there, thank you for your contribution! This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs. If you would like this issue to remain open please:
NOTE: If this issue was closed prematurely, please leave a comment. Thanks! |
Please do not kill the issue, dear stalebot. |
Current Behavior
Having trouble installing a third party library called bottleneck and I have not seen this error before using Windows 10 with Anaconda installed:
conda install bottleneck
Environment
Operating System: (Windows 10 Pro)
Python Version: 3.6.5
https://pastebin.com/Qz5tp09J
Steps to Reproduce
The text was updated successfully, but these errors were encountered: