Use of conda command Daquan

I summarize some conda command, which proved in my practice it is correct and commonly used.

 

View conda version
conda -V / - version

All virtual environment display conda: conda info -e
enter a virtual environment: activate env_name (want to enter the name of the environment)
to exit the current virtual environment: deactivate (on which a single can)
Conda created all virtual environments in Anaconda \ envs folder

List all packages: conda list

Installation package
Conda install package_name
package_name is the name of the package

Removes a package
conda remove package_name

Update package
conda update package_name
to update all packages in the environment and enter Anaconda Prompt (terminal) in: conda update --all
can also specify the update package environment, the following command can be entered to update numpy
Conda Update -n python36 numpy

Prevent conda own update (I think this too necessary!)
Conda config --set auto_update_conda False

conda add channel (download channels) command:
conda config --add channels conda-Forge
conda removed channel (download channels) command:
conda config --remove channels conda-Forge

View channels of information
conda config --show channels

Installed in the specified virtual environment package
conda install -n your_env_name [package]
For example: conda install -n py27 (this is the name of their own to build a virtual environment) pytorch torchvision

Guess you like

Origin www.cnblogs.com/ljfl-study/p/12129853.html