How to update Python to the latest version in Conda environment?

纵然是瞬间 提交于 2020-07-23 06:25:35

问题


I have tried the following command, but no luck there.

conda update python
PackageNotInstalledError: Package is not installed in prefix.
  prefix: /home/shrivatsa/anaconda3/envs/machine_learning
  package name: python

回答1:


First check for all the python version available to install using conda search python. It will give list like below.

# Name                       Version           Build  Channel             
python                        2.7.13     hac47a24_15  pkgs/main           
.
.
.
python                         3.8.2      h191fe78_0  pkgs/main           
python                         3.8.2      hcf32534_0  pkgs/main           
python                         3.8.2     hcff3b4d_13  pkgs/main           
python                         3.8.2     hcff3b4d_14  pkgs/main           
python                         3.8.3      hcff3b4d_0  pkgs/main           
python                         3.8.3      hcff3b4d_2  pkgs/main  

Then, install the latest version using conda install python=3.8.3.



来源:https://stackoverflow.com/questions/62726417/how-to-update-python-to-the-latest-version-in-conda-environment

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!