Inside of conda environment, you can update python to latest as follow:
conda update python
Or you can upgrade or downgrade the environment python version:
conda install python=3.10
Updating or Upgrading Python
Answer from n1tk on Stack OverflowInside of conda environment, you can update python to latest as follow:
conda update python
Or you can upgrade or downgrade the environment python version:
conda install python=3.10
Updating or Upgrading Python
Open conda shell prompt. (On Windows Anaconda Powershell Prompt)
You first check
conda search python
You will get all the supported versions. It may look like:
Loading channels: done
# Name Version Build Channel
python 2.7.13 h1b6d89f_16 pkgs/main
python 2.7.13 h9912b81_15 pkgs/main
python 2.7.13 hb034564_12 pkgs/main
python 2.7.14 h2765ee6_18 pkgs/main
python 2.7.14 h3e68818_15 pkgs/main
python 2.7.14 h4084c39_22 pkgs/main
python 2.7.14 h4a10d90_30 pkgs/main
python 2.7.14 h4a10d90_31 pkgs/main
python 2.7.14 h59f5a59_20 pkgs/main
python 2.7.14 h819644d_16 pkgs/main
python 2.7.14 h8c3f1cb_23 pkgs/main
python 2.7.15 h2880e7c_2 pkgs/main
python 2.7.15 h2880e7c_3 pkgs/main
python 2.7.15 h2880e7c_4 pkgs/main
python 2.7.15 hcb6e200_15 pkgs/main
python 2.7.15 hcb6e200_5 pkgs/main
python 2.7.15 hcb6e200_7 pkgs/main
python 2.7.15 he216670_0 pkgs/main
python 2.7.16 hcb6e200_0 pkgs/main
python 2.7.17 h930f6bb_0 pkgs/main
python 3.5.4 h1357f44_23 pkgs/main
python 3.5.4 hc495aa9_21 pkgs/main
python 3.5.4 hd3c4935_11 pkgs/main
python 3.5.4 hdec4e59_20 pkgs/main
python 3.5.4 hedc2606_15 pkgs/main
python 3.5.5 h0c2934d_0 pkgs/main
python 3.5.5 h0c2934d_1 pkgs/main
python 3.5.5 h0c2934d_2 pkgs/main
python 3.5.6 he025d50_0 pkgs/main
python 3.6.2 h09676a0_15 pkgs/main
python 3.6.2 h6679aeb_11 pkgs/main
python 3.6.3 h210ce5f_2 pkgs/main
python 3.6.3 h3389d20_0 pkgs/main
python 3.6.3 h3b118a2_4 pkgs/main
python 3.6.3 h9e2ca53_1 pkgs/main
python 3.6.4 h0c2934d_2 pkgs/main
python 3.6.4 h0c2934d_3 pkgs/main
python 3.6.4 h6538335_0 pkgs/main
python 3.6.4 h6538335_1 pkgs/main
python 3.6.5 h0c2934d_0 pkgs/main
python 3.6.6 hea74fb7_0 pkgs/main
python 3.6.7 h33f27b4_0 pkgs/main
python 3.6.7 h33f27b4_1 pkgs/main
python 3.6.7 h9f7ef89_2 pkgs/main
python 3.6.8 h9f7ef89_0 pkgs/main
python 3.6.8 h9f7ef89_1 pkgs/main
python 3.6.8 h9f7ef89_7 pkgs/main
python 3.6.9 h5500b2f_0 pkgs/main
python 3.7.0 hea74fb7_0 pkgs/main
python 3.7.1 h33f27b4_3 pkgs/main
python 3.7.1 h33f27b4_4 pkgs/main
python 3.7.1 h8c8aaf0_6 pkgs/main
python 3.7.1 he44a216_5 pkgs/main
python 3.7.2 h8c8aaf0_0 pkgs/main
python 3.7.2 h8c8aaf0_10 pkgs/main
python 3.7.2 h8c8aaf0_2 pkgs/main
python 3.7.3 h8c8aaf0_0 pkgs/main
python 3.7.3 h8c8aaf0_1 pkgs/main
python 3.7.4 h5263a28_0 pkgs/main
python 3.7.5 h8c8aaf0_0 pkgs/main
python 3.8.0 hff0d562_0 pkgs/main
python 3.8.0 hff0d562_1 pkgs/main
python 3.8.0 hff0d562_2 pkgs/main
Then simple select the version conda install python=3.8.0 if this is the last version.
When downloading Anaconda how do you use the latest version of Python?
`conda update python` does not actually update the python version
How to update Python in Anaconda base environment? - Stack Overflow
Issue with installing most recent version of Python, Anaconda
Videos
I'm completely new to programming and my teacher told us to download Anaconda. When I went to the official website there's Anaconda for only Python v3.9 whereas the Python website has it's latest version as 3.10.7.
So I'm pretty sure Anaconda comes with it's own version of Python, but is there anyway to use the latest version? If I download Python 3.10.7 can I switch to that instead of the default Anaconda 3.9 and still use the IDLE's?
Edit: For future reference:
-
conda cmd-->admin to grant necessary permissions.
-
create a new environment variable to combat solving env errors:
conda create --name [ENV_NAME]
-
update conda or install python version
conda update --all conda install python==[version]
Official documentation by Anaconda advises against upgrading to another major version of Python. It mentions the method you have already tried:
conda install python=3.9
but the process did not finish for you. This is in line with their documentation which says:
It is not recommended, rather it is preferable to create a new environment. The resolver has to work very hard to determine exactly which packages to upgrade.
Instead, you should create a new environment as suggested by the documentation and answers to this question.
conda create -n py39 python=3.9 anaconda
In the base environment, run mamba update python --no-pin (of course, you could do it with conda, but then you're up for a long wait!).