Managing conda: Conda 版本和信息查看
Managing conda: Conda 版本和信息查看
- 1. Verifying that conda is installed
- 2. Determining your conda version
- 3. Updating conda to the current version
- 4. Suppressing warning message about updating conda
- References
Conda
https://conda.io/projects/conda/en/latest/index.html
Conda
https://conda.io/en/latest/index.html
Miniconda
https://conda.io/en/latest/miniconda.html
Managing conda
https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-conda.html
conda 是一个包管理器,Anaconda 是一个发行包。
conda 可以理解为一个工具,也是一个可执行命令,其核心功能是包管理与环境管理。与 pip 的使用类似,环境管理则允许用户方便地安装不同版本的 Python 并可以快速切换。
Anaconda 是一个打包的集合,里面预装好了 conda、某个版本的 Python、众多 packages 等,所以也称为 Python 的一种发行版。Miniconda 只包含最基本的内容。
1. Verifying that conda is installed
To verify that conda is installed, in your terminal window or an Anaconda Prompt, run:
conda --versionConda responds with the version number that you have installed, such as conda 4.10.3.
(base) yongqiang@yongqiang:~/tensorflow_work/tensorflow$ conda --version conda 4.10.3 (base) yongqiang@yongqiang:~/tensorflow_work/tensorflow$2. Determining your conda version
In addition to theconda --versioncommand explained above, you can determine what conda version is installed by running one of the following commands in your terminal window or an Anaconda Prompt:
conda infoOR
conda -V3. Updating conda to the current version
To update conda, in your terminal window or an Anaconda Prompt, run:
conda update condaConda compares versions and reports what is available to install. It also tells you about other packages that will be automatically updated or changed with the update. If conda reports that a newer version is available, typeyto update:
Proceed ([y]/n)? y(base) yongqiang@famu-sys:~$ conda --version conda 4.7.12 (base) yongqiang@famu-sys:~$ (base) yongqiang@famu-sys:~$ conda info active environment : base active env location : /home/yongqiang/miniconda3 shell level : 1 user config file : /home/yongqiang/.condarc populated config files : conda version : 4.7.12 conda-build version : not installed python version : 3.7.4.final.0 virtual packages : __cuda=9.1 base environment : /home/yongqiang/miniconda3 (writable) channel URLs : https://repo.anaconda.com/pkgs/main/linux-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/linux-64 https://repo.anaconda.com/pkgs/r/noarch package cache : /home/yongqiang/miniconda3/pkgs /home/yongqiang/.conda/pkgs envs directories : /home/yongqiang/miniconda3/envs /home/yongqiang/.conda/envs platform : linux-64 user-agent : conda/4.7.12 requests/2.22.0 CPython/3.7.4 Linux/4.13.0-36-generic ubuntu/16.04.5 glibc/2.23 UID:GID : 1001:1001 netrc file : None offline mode : False (base) yongqiang@famu-sys:~$ (base) yongqiang@famu-sys:~$ conda -V conda 4.7.12 (base) yongqiang@famu-sys:~$ (base) yongqiang@famu-sys:~$ nvcc -V nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2017 NVIDIA Corporation Built on Fri_Sep__1_21:08:03_CDT_2017 Cuda compilation tools, release 9.0, V9.0.176 (base) yongqiang@famu-sys:~$conda update pythonupdates to the most recent in the series, so any Python 2.x would update to the latest 2.x and any Python 3.x to the latest 3.x.
4. Suppressing warning message about updating conda
To suppress the following warning message when you do not want to update conda to the latest version:
==> WARNING: A newer version of conda exists. <== current version: 4.6.13 latest version: 4.8.0Update conda by running:conda update -n base conda
Run the following command from your terminal or Anaconda Prompt:conda config --set notify_outdated_conda false
Or add the following line in your.condarcfile:notify_outdated_conda: false
References
[1] Yongqiang Cheng (程永强), https://yongqiang.blog.csdn.net/
[2] Managing conda: Conda 版本和信息查看, https://mp.weixin.qq.com/s/zcvWr3t0JQX5bihd0hidXA
