144

Python 3.8.0 is out, but I haven't been able to find any post on how to update to python 3.8 using conda - maybe they will wait for the official release? Any suggestions?

mcguip
  • 5,947
  • 5
  • 25
  • 32

4 Answers4

155

You can update your python version to 3.8 in conda using the command

conda install -c anaconda python=3.8

as per https://anaconda.org/anaconda/python. Though not all packages support 3.8 yet, running

conda update --all

may resolve some dependency failures. You can also create a new environment called py38 using this command

conda create -n py38 python=3.8

Edit - note that the conda install option will potentially take a while to solve the environment, and if you try to abort this midway through you will lose your Python installation (usually this means it will resort to non-conda pre-installed system Python installation).

mcguip
  • 5,947
  • 5
  • 25
  • 32
  • `conda update conda; conda create -n py38 -c anaconda python=3.8`? – Alexander Oct 26 '19 at 05:18
  • 5
    You can drop the channel specification, since Python 3.8 is now on the default channel. Thus `conda create -n py38 python=3.8` will create a minimal environment with Python 3.8. – egnha Oct 31 '19 at 10:25
  • 6
    If I'm **not** in an environment, does `conda install -c anaconda python=3.8` **update** the base installation? – Amelio Vazquez-Reina Nov 19 '19 at 21:50
  • Yes this should be the case. – mcguip Nov 20 '19 at 07:55
  • 17
    I wonder why Anaconda for python 3.8 version is still not out? – loveR Dec 02 '19 at 09:57
  • 3
    I can confirm it updates the base as I just did it. Conda-forge does offer a newer update of 3.8 for awareness. – WSLUser Dec 13 '19 at 17:18
  • "note that the conda install option will potentially take a while to solve the environment". In my case the conda message said it would take 'several minutes', this ended up being about 5 hours... – BrtH Jan 06 '20 at 13:51
  • 5
    Guys mine is over 12 hours and repeats with things like `17%Finding shortest conflict path for python-/ teutil[version='>=2.1,<2.7.0']: 1Finding shortest conflict path for python-dateutil[version='>=2.1,<2.7.0']: 18%|▏| 61/343 [12:10:13<8:24:26, 107.33s/it]` I'm newby to Python. Shall I leave it run? – nba2020 Jan 10 '20 at 09:09
  • @nba2020 that's absurdly long. It's probably NP-hard to calculate dependencies or something. At this point it'd be much faster to create a new conda env and install what you need. – ijoseph Mar 03 '20 at 19:05
  • The install command which specified you have specified - does it install python 3.8 along side existing python (I have 3.6 existing) or does it upgrade the existing to 3.8? – variable Mar 19 '20 at 15:56
  • 2
    @nba2020: I can confirm, it takes forever to compute a long list of conflicts and it stops there. So, there does not seem to be a way to upgrade python from 3.7 to 3.8 – FabPop May 18 '20 at 15:14
  • I got numerous (a few pages) warnings about diverse packages conflicts and I still have Python 3.7.7. – Mathemilda Jul 03 '20 at 19:20
  • what does `conda install -c anaconda python=3.8` do? – Charlie Parker Dec 01 '20 at 21:43
48

Open Anaconda Prompt (base):

  1. Update conda:
conda update -n base -c defaults conda
  1. Create new environment with Python 3.8:
conda create -n python38 python=3.8
  1. Activate your new Python 3.8 environment:
conda activate python38
  1. Start Python 3.8:
python
Nicolas Gervais
  • 33,817
  • 13
  • 115
  • 143
  • 3
    This solution got the job done and worked like a charm in Anaconda Prompt, but it didn't got available outside it. Any clue on how to make the activated python available system wide? – Gilberto Albino Jan 15 '20 at 23:34
  • 2
    You will need to switch to your newly created python environment using command conda activate – Netverse Jan 22 '20 at 07:50
  • It is only showing like 17 items on the list. why not the full list? – Rishabh Deep Singh Mar 26 '20 at 00:22
  • When I active using windows command shell it failed. Later, I change to directory where my environment installed, then typed just "activate" solved my issue. I validate by typing python gives me latest 3.8.2 version. I search for the environment directory by "conda info --envs" in the command line. – AbuTaareq Mar 30 '20 at 15:27
  • 10
    This solution is correct but what should be done to upgrading python in base env? – Sarthak Kumar Apr 12 '20 at 14:59
26

Now that the new anaconda individual edition 2020 distribution is out, the procedure that follows is working:

Update conda in your base env:

conda update conda

Create a new environment for Python 3.8, specifying anaconda for the full distribution specification, not just the minimal environment:

conda create -n py38 python=3.8 anaconda

Activate the new environment:

conda activate py38

python --version
Python 3.8.1

Number of packages installed: 303

Or you can do:

conda create -n py38 anaconda=2020.02 python=3.8

--> UPDATE: Finally, Anaconda3-2020.07 is out with core Python 3.8.3

You can download Anaconda with Python 3.8 from https://www.anaconda.com/products/individual

Ruben Mejia
  • 269
  • 4
  • 6
8

Update for 2020/07

Finally, Anaconda3-2020.07 is out and its core is Python 3.8!

You can now download Anaconda packed with Python 3.8 goodness at:

Simon Streicher
  • 2,638
  • 1
  • 26
  • 30