12

I want to upgrade my base environment to Python 3.8. According to the official documentation, I should just run conda install -c anaconda python. This, however, only upgrades Python 3.7, so, in the end:

(base) C:\Users\bob>conda install -c anaconda python
Collecting package metadata (current_repodata.json): done
Solving environment: done

# All requested packages already installed.


(base) C:\Users\bob>python --version
Python 3.7.6

conda update -c anaconda python only updated a number of packages, but not Python itself.

And if I specify a version, like explained here, after two hours analyzing dependencies, the upgrade fails because of conflicts.

I managed to set up a 3.8 environment, but I'd rather upgrade my base environment as it's the one my system path for use outside of Anaconda.

Any suggestion?

mrgou
  • 1,576
  • 2
  • 21
  • 45

3 Answers3

4

It doesn't appear to be possible to update the base version of anaconda to 3.8 yet because of the conflicts you mention. I assume once all the standard packages are updated to support 3.8+ (and updated versions of all dependencies), then the anaconda release will include 3.8.x as the default. This might take a while.

The problem here is version conflicts in the packages that anaconda installs by default. The reason you can install 3.8 in a clean environment is because no other packages are installed in that environment, so no conflicts.

This does now present a solution, although it requires reinstalling everything from scratch...

disclaimer: I don't use windows, so adapt my instructions accordingly to your OS.

  • Remove your existing anaconda install from the path and delete anything in your bashrc (or windows equivalent) that points to it.
    • You can just delete/uninstall anaconda, but it's good to have a backup just incase, so leaving it there and removing links to it is a good option.
  • Download and install miniconda, and put it in your path as you had before.
  • Install python 3.8 in the base environment conda install python=3.8
  • Install all the packages that you need to do whatever you do.

Depending on what you install, at some point you may run into the same conflicts that prevent a standard anaconda install from updating at the moment, but that hasn't happened for me.

Shannon
  • 438
  • 4
  • 10
  • As of now miniconda supports up to python 3.7. – Nick Jun 11 '20 at 19:28
  • Yes, and you can upgrade a fresh install of miniconda to python 3.8 very easily by following that dot point of my instructions. Then you have a base environment at 3.8, which is what the OP is after. – Shannon Jun 12 '20 at 05:02
2

The latest stable version of anaconda is version 3.7

Please see here:

https://www.anaconda.com/distribution/

There isn't an option to get python 3.8, this is due to anaconda sometimes running a version behind the release of python.

CodeCupboard
  • 1,507
  • 3
  • 17
  • 26
  • 1
    Except there is: https://stackoverflow.com/questions/58568175/upgrade-to-python-3-8-using-conda . One can create a conda environment with python 3.8, but updating the base environment is where the problem lies. – Cal Mar 04 '20 at 14:32
  • I agree it is possible to do that - but it doesn't mean it stable or fully supported yet. – CodeCupboard Mar 04 '20 at 14:35
  • Not according to the references I indicated in my post, including Anaconda's own documentation. https://anaconda.org/anaconda/python – mrgou Mar 04 '20 at 14:35
1

I had the same issue and found there is a 2020-07 release of Anaconda with Python 3.8 https://www.anaconda.com/products/individual

Petra
  • 11
  • 2