Commands for managing virtual python environment
Use the following commands via mac’s terminal application.
Function | Command | Description |
---|---|---|
Display | % conda info | To display information about the current anaconda installation |
List | % conda env list | To list all python environment setup in your computer. * sign refers to the default environment |
Create | % conda create –name [name of env] python=3.7 numpy | Create a brand new virtual anaconda environment with specific python version and packages. Environment created by anaconda navigator 2.1.2 on MacOS Montery is located at ~/opt/anaconda3 |
Activate | %conda activate –name [name of env] | To activate a named environment |
Deactivate | %conda deactivate | To deactivate the current environment |
List | %conda list | To list all active package in the current active environment |
List with revision | %conda list –revision | To list all revision for the current environment |
Rollback | %conda install –revision 1 | To rollback to revision 1 |
Delete | %conda env remove –name [name of env] | To remove an environment |