Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't upgrade Anaconda base to Python 3.8

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?

like image 649
mrgou Avatar asked Mar 04 '20 14:03

mrgou


People also ask

Can I install Python 3.8 with anaconda?

Anaconda supports Python 3.7, 3.8, 3.9 and 3.10.

How do I install Python 3.9 on anaconda?

So, how do I install python 3.9 in a conda env with all functionalities like pip working? This can be installed via conda with the command conda install -c anaconda python=3.9 as per anaconda.org/anaconda/python. running conda update --all may resolve some dependency failures. Is python3.


2 Answers

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.

like image 91
CodeCupboard Avatar answered Oct 19 '22 16:10

CodeCupboard


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.

like image 38
Shannon Avatar answered Oct 19 '22 15:10

Shannon