Classmates, don't blink!
It's not peaceful these days! This semester selected machine learning and big data analysis and artificial intelligence technology. These are all machine learning. I thought about the relevant knowledge in advance and prepared to use anaconda to complete a sklearn machine learning environment.
Unexpectedly, I went in and saw an environment called untitled built before!
This irritates me, I have to find a way to get rid of it, but there have been bugs yesterday, and the bugs that cannot
be deleted turned out to be No need to hit the cmd command line; , I hit every time; it caused a command error, and I always thought it was a problem with the machine
View the list of virtual environments
We can open the command list through cmd or Anaconda Prompt, both of which work, I tried!
conda env list
conda info --envs
Both commands can view the list of virtual environments
Delete environment
conda remove -n xxxxx(名字) --all
Explanation:removeMeans delete,-nYes (the abbreviation of name), xxxxx is the name of the virtual environment to be deleted, and the last ==–all== If not added, it means that a package in the current environment is deleted, such as numpy, etc., if added Just delete the virtual environment.
Note again: no;
Incidentally introduce other operations
Create a new virtual environment
conda create -n xxxxx(名字) python=3.8
Explanation:createIs the meaning of creation,-nYes (abbreviation of name), xxxxx is the name of the virtual environment created,python=3.8Indicates that the interpreter of python3.8 is configured for this virtual environment
Enter the virtual environment
activate xxxxx(名字)
View the library of the virtual environment
pip list
Exit the virtual environment
deactivat
It's cool to delete the effect of the virtual environment
Note that after this command is called, there is another input y and carriage return that asks you y/n!
We can see that the deleted virtual environment is no longer found, and it has been killed!