0

How can I update Python in the Anaconda base environment? Is Python intended to be upgradable in the base environment at all, or should one completely remove and reinstall Anaconda? Any version will eventually go out of support, so there should be some solution.

What I have tried so far, and did not result in Python getting updated:

  • conda update --all
  • conda update python and conda update anaconda
  • conda install python=3.9 or conda install anaconda=2021.11 do not finish after an hour and a half.
  • mamba install python=3.9 results in "package python_abi-3.7-2_cp37m requires python 3.7.*, but none of the providers can be installed"
  • No other suggestion is put forward here.
Szabolcs
  • 23,023
  • 7
  • 79
  • 164
  • https://stackoverflow.com/questions/57701571/what-is-the-right-way-to-update-anaconda-and-conda-base-environments – Niels Perfors Jan 23 '22 at 09:35
  • Maybe you can check the answer here [https://stackoverflow.com/questions/41535881/how-do-i-upgrade-to-python-3-6-with-conda] – Suvo Jan 23 '22 at 09:35
  • @NielsPerfors What suggestion is found there that I did not already list above? – Szabolcs Jan 23 '22 at 09:37
  • The Python in **base** not meant to be updated beyond patches. I recommend remove (after dumping other environments to YAML), then install Mambaforge, and stop using **base** for work (just activate the environment you want as default in your `~/.bash_profile`). However, if you'd like to continue trying to push the in-place upgrade, maybe try `mamba install python=3.9 anaconda=2021.11 conda=4.11`? If that still snags, you'd probably have to hack the `conda-meta/history` to remove the constraints that are stopping things (only advanced users should ever touch this file!). – merv Jan 23 '22 at 15:23
  • 1
    @merv Thanks! I was not aware that environments could be backed up to a YAML file. I will reinstall everything, and will install miniconda. At this point it seems like the least painful thing. – Szabolcs Jan 23 '22 at 15:39

0 Answers0