Summary of common conda commands


In cmd in the conda environment:
insert image description here


1. View the tools in the current environment

pip list

or

conda list

2. Create a virtual environment

conda create --name [环境名称]

Such as

conda create --name shuangyunzi

That is, a virtual environment named shuangyunzi is created.


3. View all current virtual environments

conda env list

insert image description here

where base is the local environment. The others are virtual environments.
The * symbol indicates the current environment in use.


4. Switch environment

To switch, use activate plus the name of the environment to switch.

activate [环境名称]

Such as:

activate shuangyunzi

insert image description here
As shown in the figure, the local environment is switched to the "double rhyme" environment of Xiaojiu.


5. Exit the virtual environment

conda deactivate

insert image description here
The picture is back to the local environment.


6. Remove the virtual environment

conda remove --name xxx ---all

Such as

conda remove --name shuangyunzi --all

7. Package Installation

(No need to enter the target environment)

conda install [包名] -n [环境名]

8. Uninstalling the package

conda remove [包名]

Guess you like

Origin blog.csdn.net/weixin_48964486/article/details/123647090