Setup a Anaconda Virtual Environment
Setup Anaconda Virtual Environment
Anaconda Virtual environments allow multiple projects to have their own dependencies.
Creating a New Environment
Run the following command to create an environment called aienv
> conda create –name aienv
To create environment with specific python version
> conda create –name my_env python=3.9
Activating the Environment
Run the following command to activate the environment:
> conda activate aienv
Install Package in the Environment
Run the following command to install the packages:
Install single package: For example, transformers
> conda install transformers
Install multiple packages: For example, NumPy, Pandas, and Matplotlib
> conda install numpy pandas matplotlib
Deactivate the Environment
Run the following command to deactivate the environment:
> conda deactivate
Remove the Environment
Run the following command to remove the environment:
> conda remove –name my_env –all